services:
    _defaults:
        autowire: true
        autoconfigure: true
        public: false
        bind:
            $installed: '%env(ZIKULA_INSTALLED)%'
            $projectDir: '%kernel.project_dir%'
            $databaseUrl: '%env(DATABASE_URL)%'

    # alias interface to doctrine service
    Doctrine\Persistence\ManagerRegistry: '@doctrine'

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

    Zikula\Bundle\CoreBundle\Controller\:
        resource: '../../Controller/*Controller.php'

    Zikula\Bundle\CoreBundle\HttpKernel\ZikulaHttpKernelInterface: '@kernel'

    Zikula\Bundle\CoreBundle\Controller\MainController:
        public: true

    Zikula\Bundle\CoreBundle\DataCollector\ZikulaVersionDataCollector:
        tags:
            - { name: data_collector, template: '@Core/Collector/ZikulaVersion.html.twig', id: 'zikula_version', priority: 300 }

    Zikula\Bundle\CoreBundle\DynamicConfigDumper:
        arguments:
          $configDir: '%kernel.project_dir%/config'
          $env: '%env(APP_ENV)%'

    Zikula\Bundle\CoreBundle\CacheClearer:
        arguments:
          $warmer: '@cache_warmer'
          $fosJsRoutesExtractor: '@fos_js_routing.extractor'
          $cacheDir: '%kernel.cache_dir%'
          $kernelContainerClass: '%kernel.container_class%'
          $routingLocales: '%jms_i18n_routing.locales%'

    Zikula\Bundle\CoreBundle\EventListener\BlameListener:
        arguments:
          $blameableListener: '@stof_doctrine_extensions.listener.blameable'

    Zikula\Bundle\CoreBundle\EventListener\ClickjackProtectionListener:
        arguments:
          $xFrameOptions: '%security.x_frame_options%'

    Zikula\Bundle\CoreBundle\EventListener\DoctrineListener:
        arguments:
          $driver: '@doctrine.orm.default_annotation_metadata_driver'

    Zikula\Bundle\CoreBundle\EventListener\SiteOffVetoLoginListener:
        lazy: true

    Zikula\Bundle\CoreBundle\EventListener\LoggerListener:
        arguments:
          $loggableListener: '@stof_doctrine_extensions.listener.loggable'

    Zikula\Bundle\CoreBundle\Site\SiteDefinition:
        arguments:
          $pageVars: '@zikula_core.common.theme.pagevars'

    Symfony\Component\HttpKernel\Fragment\FragmentHandler: '@fragment.handler'

    Michelf\:
        resource: '../../../../../vendor/michelf/php-markdown/Michelf/*'

    Zikula\Bundle\CoreBundle\Maker\ExtensionMaker:
        arguments:
            $fileManager: '@maker.file_manager'
