services:
    _defaults:
        autoconfigure: true

    _instanceof:
        Symfony\Bundle\FrameworkBundle\Controller\AbstractController:
            calls:
                - [setContainer, ['@Psr\Container\ContainerInterface']]

        Contao\CoreBundle\Controller\AbstractController:
            tags:
                - { name: container.service_subscriber, id: contao.csrf.token_manager }

        Contao\CoreBundle\Controller\AbstractFragmentController:
            tags:
                - { name: container.service_subscriber, id: contao.twig.filesystem_loader }
                - { name: container.service_subscriber, id: contao.twig.interop.context_factory }

        Contao\CoreBundle\Controller\FrontendModule\AbstractFrontendModuleController:
            tags:
                - { name: container.service_subscriber, id: contao.csrf.token_manager }

        Contao\CoreBundle\Controller\Page\AbstractLayoutPageController:
            tags:
                - { name: container.service_subscriber, id: contao.routing.page_finder }
                - { name: container.service_subscriber, id: contao.routing.response_context_accessor }
                - { name: container.service_subscriber, id: contao.routing.response_context_factory }
                - { name: container.service_subscriber, id: contao.security.token_checker }
                - { name: container.service_subscriber, id: contao.image.picture_factory }
                - { name: container.service_subscriber, id: contao.image.preview_factory }
                - { name: container.service_subscriber, id: contao.assets.assets_context }
                - { name: container.service_subscriber, id: contao.twig.defer.renderer }

    # We explicitly allow autowiring and FQCN service IDs in controllers
    Contao\CoreBundle\Controller\AltchaController:
        arguments:
            - '@contao.altcha'

    Contao\CoreBundle\Controller\BackendController: ~

    Contao\CoreBundle\Controller\BackendCsvImportController:
        public: true
        arguments:
            - '@contao.framework'
            - '@database_connection'
            - '@request_stack'
            - '@translator'
            - '%kernel.project_dir%'

    Contao\CoreBundle\Controller\BackendJobsController:
        arguments:
            - '@contao.job.jobs'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\BackendPreviewController:
        arguments:
            - '%contao.preview_script%'
            - '@contao.security.frontend_preview_authenticator'
            - '@event_dispatcher'
            - '@security.helper'
            - '@security.authenticator.firewall_aware_login_link_handler'
            - '@uri_signer'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\BackendPreviewSwitchController:
        arguments:
            - '@contao.security.frontend_preview_authenticator'
            - '@contao.security.token_checker'
            - '@database_connection'
            - '@security.helper'
            - '@twig'
            - '@router'
            - '@contao.csrf.token_manager'
            - '@translator'
            - '%contao.backend.attributes%'
            - '%contao.backend.badge_title%'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\CaptchaController:
        arguments:
            - '@contao.framework'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\ContentElement\AccordionController:
        arguments:
            - '@contao.framework'

    Contao\CoreBundle\Controller\ContentElement\CodeController: ~

    Contao\CoreBundle\Controller\ContentElement\DescriptionListController: ~

    Contao\CoreBundle\Controller\ContentElement\DownloadsController:
        arguments:
            - '@security.helper'
            - '@contao.filesystem.virtual.files'

    Contao\CoreBundle\Controller\ContentElement\ElementGroupController: ~

    Contao\CoreBundle\Controller\ContentElement\HeadlineController: ~

    Contao\CoreBundle\Controller\ContentElement\HtmlController: ~

    Contao\CoreBundle\Controller\ContentElement\HyperlinkController:
        arguments:
            - '@contao.image.studio'
            - '@contao.insert_tag.parser'

    Contao\CoreBundle\Controller\ContentElement\ImagesController:
        arguments:
            - '@security.helper'
            - '@contao.filesystem.virtual.files'
            - '@contao.image.studio'
            - '%contao.image.valid_extensions%'

    Contao\CoreBundle\Controller\ContentElement\ListController: ~

    Contao\CoreBundle\Controller\ContentElement\LoginController:
        arguments:
            - '@uri_signer'
            - '@security.logout_url_generator'
            - '@security.authentication_utils'
            - '@translator'
            - '@event_dispatcher'
            - '@contao.framework'

    Contao\CoreBundle\Controller\ContentElement\ManagePasskeysController:
        arguments:
            - '@contao.repository.webauthn_credential'
            - '@uri_signer'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\ContentElement\MarkdownController: ~

    Contao\CoreBundle\Controller\ContentElement\PlayerController:
        arguments:
            - '@contao.filesystem.virtual.files'

    Contao\CoreBundle\Controller\ContentElement\SwiperController: ~

    Contao\CoreBundle\Controller\ContentElement\TableController: ~

    Contao\CoreBundle\Controller\ContentElement\TemplateController: ~

    Contao\CoreBundle\Controller\ContentElement\TeaserController: ~

    Contao\CoreBundle\Controller\ContentElement\TextController:
        arguments:
            - '@contao.image.studio'

    Contao\CoreBundle\Controller\ContentElement\ToplinkController: ~

    Contao\CoreBundle\Controller\ContentElement\UnfilteredHtmlController: ~

    Contao\CoreBundle\Controller\ContentElement\VideoController:
        arguments:
            - '@contao.image.studio'

    Contao\CoreBundle\Controller\CspReporterController:
        arguments:
            - '@contao.framework'
            - '@?nelmio_security.csp_reporter_controller'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\FaviconController:
        arguments:
            - '@contao.framework'
            - '@contao.routing.page_finder'
            - '%kernel.project_dir%'
            - '@contao.cache.tag_manager'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\FrontendController:
        tags:
            - controller.service_arguments
            - { name: container.service_subscriber, id: contao.cron }
            - { name: container.service_subscriber, id: contao.csrf.token_manager }

    Contao\CoreBundle\Controller\FrontendModule\FeedReaderController:
        arguments:
            - '@contao.feed.feedio'
            - '@logger'
            - '@cache.system'

    Contao\CoreBundle\Controller\FrontendModule\RootPageDependentModulesController: ~

    Contao\CoreBundle\Controller\FrontendModule\TemplateController: ~

    Contao\CoreBundle\Controller\FrontendModule\TwoFactorController: ~

    Contao\CoreBundle\Controller\FrontendModule\UnfilteredHtmlController: ~

    Contao\CoreBundle\Controller\ImagesController:
        public: true
        arguments:
            - '@contao.image.factory'
            - '@contao.image.resizer'
            - '%contao.image.target_dir%'
            - '@?filesystem'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\InsertTagsController:
        arguments:
            - '@contao.insert_tag.parser'
            - '@contao.framework'
            - '@kernel'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\Page\ErrorPageController:
        arguments:
            - '@contao.framework'

    Contao\CoreBundle\Controller\Page\RedirectPageController:
        arguments:
            - '@contao.routing.content_url_generator'

    Contao\CoreBundle\Controller\Page\RegularPageController: ~

    Contao\CoreBundle\Controller\Page\RootPageController:
        arguments:
            - '@?logger'
        tags:
            - { name: monolog.logger, channel: contao.error }

    Contao\CoreBundle\Controller\PreviewLinkController:
        arguments:
            - '@contao.security.frontend_preview_authenticator'
            - '@uri_signer'
            - '@database_connection'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\RedirectController:
        public: true
        arguments:
            - '@Symfony\Bundle\FrameworkBundle\Controller\RedirectController'

    Contao\CoreBundle\Controller\RobotsTxtController:
        arguments:
            - '@contao.routing.page_finder'
            - '@event_dispatcher'
        tags:
            - controller.service_arguments

    Contao\CoreBundle\Controller\SitemapController:
        arguments:
            - '@contao.routing.page_registry'
            - '@contao.routing.page_finder'
            - '@contao.routing.content_url_generator'
        tags:
            - controller.service_arguments
