# Learn more about services, parameters and containers at
# http://symfony.com/doc/current/book/service_container.html
parameters:
#    parameter_name: value

services:
#    service_name:
#        class: AppBundle\Directory\ClassName
#        arguments: ["@another_service_name", "plain_value", "%parameter_name%"]
   app.form.registration :
       class : UtilisateursBundle\Form\RegistrationFormType
       tags :
           - { name : form.type, alias : app_user_registration}
           
# authentication failure event listener
   bm.security.authentication_failure_event_listener:
        class: UtilisateursBundle\Listener\SecurityListener
        arguments: ['@security.context','@doctrine', '@service_container','@request_stack']
        tags:
            - { name: kernel.event_listener, event: security.authentication.failure, method: onAuthenticationFailure }
 
    # authentication success event listener
   bm.security.interactive_login_listener:
        class: UtilisateursBundle\Listener\SecurityListener
        arguments: ['@security.context','@doctrine', '@service_container','@request_stack']
        tags:
            - { name: kernel.event_listener, event: security.interactive_login, method: onAuthenticationSuccess }
   bm.session.logout:
        class: UtilisateursBundle\Listener\SecurityListener
        arguments: ['@security.context','@doctrine', '@service_container']
        
   utilisateurs.notification:
        class: UtilisateursBundle\Message\Notification
        arguments: ['@doctrine']