parameters:
    knp.doctrine_behaviors.reflection.class_analyzer.class: Knp\DoctrineBehaviors\Reflection\ClassAnalyzer
    knp.doctrine_behaviors.reflection.is_recursive: true
    knp.doctrine_behaviors.translatable_listener.class: Knp\DoctrineBehaviors\ORM\Translatable\TranslatableListener
    knp.doctrine_behaviors.translatable_listener.current_locale_callable.class: Knp\DoctrineBehaviors\ORM\Translatable\CurrentLocaleCallable

services:
    knp.doctrine_behaviors.reflection.class_analyzer:
        class:   "%knp.doctrine_behaviors.reflection.class_analyzer.class%"
        public:  false

    knp.doctrine_behaviors.translatable_listener:
        class: "%knp.doctrine_behaviors.translatable_listener.class%"
        public: false
        arguments:
            - "@knp.doctrine_behaviors.reflection.class_analyzer"
            - "%knp.doctrine_behaviors.reflection.is_recursive%"
            - "@knp.doctrine_behaviors.translatable_listener.current_locale_callable"
        tags:
            - { name: doctrine.event_subscriber }

    knp.doctrine_behaviors.translatable_listener.current_locale_callable:
        class: "%knp.doctrine_behaviors.translatable_listener.current_locale_callable.class%"
        arguments:
            - "@service_container" # lazy request resolution
        public: false
