parameters:
    jms_i18n_routing.route_exclusion_strategy.class: Zikula\RoutesModule\Translation\DefaultRouteExclusionStrategy

services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false
        bind:
            $extension: '@Zikula\RoutesModule\ZikulaRoutesModule'
            $twigLoader: '@twig.loader'

    Zikula\RoutesModule\:
        resource: '../../*'
        exclude: '../../{bootstrap.php,Base/bootstrap.php,Tests,vendor}'

    Zikula\RoutesModule\Helper\:
        resource: '../../Helper/*'
        lazy: true

    Zikula\RoutesModule\Translation\ZikulaPatternGenerationStrategy:
        arguments:
            $strategy: '%jms_i18n_routing.strategy%'
            $locales: '%jms_i18n_routing.locales%'
            $cacheDir: '%kernel.cache_dir%'
            $translationDomain: '%jms_i18n_routing.catalogue%'
            $defaultLocale: '%jms_i18n_routing.default_locale%'

    jms_i18n_routing.pattern_generation_strategy: '@Zikula\RoutesModule\Translation\ZikulaPatternGenerationStrategy'

    # public because EntityLifecycleListener accesses this using container
    Zikula\RoutesModule\Entity\Factory\EntityFactory:
        public: true

    Zikula\RoutesModule\Form\Handler\:
        resource: '../../Form/Handler'
        calls:
            - setLockingApi: ['@?Zikula\PageLockModule\Api\LockingApi']

    Zikula\RoutesModule\Helper\MultilingualRoutingHelper:
        arguments:
            $installed: '%env(ZIKULA_INSTALLED)%'

    Zikula\RoutesModule\Helper\RouteDumperHelper:
        arguments:
            $dumpCommand: '@fos_js_routing.dump_command'

    Zikula\RoutesModule\Listener\EntityLifecycleListener:
        tags: ['doctrine.event_subscriber']

    Zikula\RoutesModule\Menu\MenuBuilder:
        tags:
            - { name: knp_menu.menu_builder, method: createItemActionsMenu, alias: zikulaRoutesMenuItemActions }
            - { name: knp_menu.menu_builder, method: createViewActionsMenu, alias: zikulaRoutesMenuViewActions }

    jms_i18n_routing.route_exclusion_strategy:
        class: '%jms_i18n_routing.route_exclusion_strategy.class%'
    JMS\I18nRoutingBundle\Router\RouteExclusionStrategyInterface:
        '@jms_i18n_routing.route_exclusion_strategy'

    Zikula\RoutesModule\Routing\RouteLoader:
        arguments:
            $locale: '%locale%'
        tags: ['routing.loader']
