parameters:
    user_provider.class:    Webeloping\LanderBundle\Security\UserProvider
    url_encryptor.class:    Webeloping\LanderBundle\Security\UrlEncryptor

services:
    form.field.type.color_palette:
        class: Webeloping\LanderBundle\Form\Field\ColorPaletteField
        tags:
            - { name: form.type, alias: color_palette }

    form.field.type.tag:
        class: Webeloping\LanderBundle\Form\Field\TagField
        tags:
            - { name: form.type, alias: tag }
        arguments: ["@doctrine"]

    kernel.listener:
        class: Webeloping\LanderBundle\Listener\MasterRequestSubscriber
        arguments: [ @service_container, @router ]
        tags:
            - { name: kernel.event_listener, event: kernel.request, method: onKernelRequest }

    url_encryptor:
        class:    "%url_encryptor.class%"
        arguments: [%secret%]

    url_encryptor.twig_extension:
        class: Webeloping\LanderBundle\Twig\Extension\UrlEncryptorExtension
        arguments: ["@url_encryptor"]
        tags:

    utils.twig_extension:
        class: Webeloping\LanderBundle\Twig\Extension\UtilsExtension
        arguments: ["@service_container"]
        tags:
          - { name: twig.extension }

    security.access.community_voter:
        class:      Webeloping\LanderBundle\Security\Authorization\Voter\CommunityVoter
        public:     false
        tags:
           - { name: security.voter }
        calls:
            - [ setContainer, [ @service_container ] ]

    twig.extension.intl:
        class: Twig_Extensions_Extension_Intl
        tags:
            - { name: twig.extension }

    kernel_response.listener:
        class: Webeloping\LanderBundle\Listener\KernelResponseListener
        tags:
            - { name: "kernel.event_listener", event: "kernel.response", method: "onKernelResponse" }

    community_voter.listener:
        class: Webeloping\LanderBundle\Listener\CommunityActionListener
        arguments: ["@service_container", "@request_stack"]
        tags:
            - { name: "kernel.event_listener", event: "community.action", method: "setEvent" }
            - { name: "kernel.event_listener", event: "community.action", method: "onAction" }
            
    notification.listener:
        class: Webeloping\LanderBundle\Listener\NotificationListener
        arguments: ["@service_container","@request_stack"]
        tags:
            - { name: "kernel.event_listener", event: "notification.activity", method: "onRequestActivity" }
            - { name: "kernel.event_listener", event: "notification.create", method: "onNewNotification" }

    security.interactive_login_listener:
        class: Webeloping\LanderBundle\Listener\AuthenticationListener
        calls:
            - [ setDoctrine,    [@doctrine] ]
            - [ setRequest,     [@request_stack] ]
        tags:
            - { name: kernel.event_listener, event: security.interactive_login, method: onAuthenticationSuccess }

    image_preview.field_type_extension:
        class: Webeloping\LanderBundle\Form\Extension\ImagePreviewExtension
        tags:
            - { name: form.type_extension, alias: file }

# MONOLOG
    webeloping.monolog.processor.request:
        class: Webeloping\LanderBundle\Processor\RequestProcessor
        arguments: ["@service_container"]
        tags:
            - { name: monolog.processor }
    webeloping.monolog.processor.session:
        class: Webeloping\LanderBundle\Processor\SessionProcessor
        arguments: ["@session"]
        tags:
            - { name: monolog.processor }
    webeloping.monolog.processor.user:
        class: Webeloping\LanderBundle\Processor\UserProcessor
        arguments: ["@service_container"]
        tags:
            - { name: monolog.processor }