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

services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: true

    Symfony\Component\DependencyInjection\ContainerInterface:
        alias: 'service_container'
        public: true

    Cyberl\FceBundle\Controller\:
        resource: '../src/Cyberl/FceBundle/Controller/*'
        tags: ['controller.service_arguments']

    Cyberl\UserBundle\Controller\:
        resource: '../src/Cyberl/UserBundle/Controller/*'
        tags: ['controller.service_arguments']

    AppBundle\Controller\:
        resource: '../src/AppBundle/Controller/*'
        tags: ['controller.service_arguments']

#    service_name:
#        class: AppBundle\Directory\ClassName
#        arguments: ["@another_service_name", "plain_value", "%parameter_name%"]
#    twig.extension.intl:
#       class: Twig_Extensions_Extension_Intl
#       tags:
#           - { name: twig.extension }
    twig.extension.text:
       class: Cyberl\FceBundle\Extension\TruncateHtmlExtension
       tags:
           - { name: twig.extension }
    twig.extension.debug:
        class: Twig\Extension\DebugExtension
        tags:
            - { name: twig.extension }

    security.context:
        class: Cyberl\FceBundle\Security\SecurityContextCompatibility
        arguments: ["@security.token_storage", "@security.authorization_checker"]
        public: true

    Cyberl\FceBundle\Security\SecureAnnotationListener:
        arguments: ["@security.authorization_checker"]
        tags:
            - { name: kernel.event_listener, event: kernel.controller, method: onKernelController }



    Cyberl\FceBundle\Twig\LegacyTemplateLoader:
        decorates: twig.loader
        arguments: ['@Cyberl\FceBundle\Twig\LegacyTemplateLoader.inner']

    Cyberl\FceBundle\Twig\LocalizedDateExtension:
        tags:
            - { name: twig.extension }

    Cyberl\FceBundle\Extension\StimulusCompatibilityExtension:
        tags:
            - { name: twig.extension }

    Cyberl\FceBundle\Command\FixDatabaseCommand:
        arguments: ['@doctrine.orm.entity_manager']
        tags:
            - { name: console.command }

    Cyberl\FceBundle\Doctrine\LegacyRepositoryFactory:
        decorates: doctrine.orm.container_repository_factory
        arguments: ['@Cyberl\FceBundle\Doctrine\LegacyRepositoryFactory.inner']

    mailer:
        alias: 'mailer.mailer'
        public: true

    Cyberl\FceBundle\EventListener\MailerFromListener:
        arguments: ['%mailer_user%']
        tags:
            - { name: kernel.event_subscriber }





