parameters:
    ezpublish_legacy.view_provider.class: eZ\Publish\Core\MVC\Legacy\View\Provider
    ezpublish_legacy.content_view_provider.class: eZ\Publish\Core\MVC\Legacy\View\Provider\Content
    ezpublish_legacy.location_view_provider.class: eZ\Publish\Core\MVC\Legacy\View\Provider\Location
    ezpublish_legacy.block_view_provider.class: eZ\Publish\Core\MVC\Legacy\View\Provider\Block
    ezpublish_legacy.view_decorator.twig.class: eZ\Publish\Core\MVC\Legacy\View\TwigContentViewLayoutDecorator
    ezpublish_legacy.view_decorator.options:
        viewbaseLayout: %ezpublish.content_view.viewbase_layout%
        contentBlockName: %ezpublish.content_view.content_block_name%

services:
    ezpublish_legacy.view_provider:
        class: %ezpublish_legacy.view_provider.class%
        arguments: [@ezpublish_legacy.kernel, @ezpublish_legacy.view_decorator, @ezpublish_legacy.templating.legacy_helper, @?logger]
        abstract: true

    ezpublish_legacy.content_view_provider:
        class: %ezpublish_legacy.content_view_provider.class%
        parent: ezpublish_legacy.view_provider
        tags:
            - {name: ezpublish.content_view_provider, priority: -255}

    ezpublish_legacy.location_view_provider:
        class: %ezpublish_legacy.location_view_provider.class%
        parent: ezpublish_legacy.view_provider
        calls:
            # Injecting the request, in non strict mode ("=") avoiding this service to be forced in request scope.
            - [setRequest, [@?request=]]
        tags:
            - {name: ezpublish.location_view_provider, priority: -255}

    ezpublish_legacy.block_view_provider:
        class: %ezpublish_legacy.block_view_provider.class%
        parent: ezpublish_legacy.view_provider
        calls:
            - [setPageService, [@ezpublish.fieldType.ezpage.pageService]]
        tags:
            - {name: ezpublish.block_view_provider, priority: -255}

    ezpublish_legacy.view_decorator.twig:
        class: %ezpublish_legacy.view_decorator.twig.class%
        arguments: [@twig, %ezpublish_legacy.view_decorator.options%, @ezpublish.config.resolver]

    ezpublish_legacy.view_decorator:
        alias: ezpublish_legacy.view_decorator.twig
