<?xml version="1.0" ?>

<container xmlns="http://symfony.com/schema/dic/services"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">

    <services>
        <service id="Shopware\Core\Content\Seo\SeoUrl\SeoUrlDefinition">
            <tag name="shopware.entity.definition"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrl\SalesChannel\SalesChannelSeoUrlDefinition">
            <tag name="shopware.sales_channel.entity.definition"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlTemplate\SeoUrlTemplateDefinition">
            <tag name="shopware.entity.definition"/>
        </service>

        <service id="Shopware\Core\Content\Seo\MainCategory\MainCategoryDefinition">
            <tag name="shopware.entity.definition"/>
        </service>

        <service id="Shopware\Core\Content\Seo\MainCategory\SalesChannel\SalesChannelMainCategoryDefinition">
            <tag name="shopware.sales_channel.entity.definition"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlGenerator">
            <argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\DefinitionInstanceRegistry"/>
            <argument type="service" id="router.default"/>
            <argument type="service" id="request_stack"/>
            <argument type="service" id="shopware.seo_url.twig"/>
            <argument type="service" id="Shopware\Core\Framework\Adapter\Twig\TwigVariableParserFactory"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlPersister">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument type="service" id="seo_url.repository"/>
            <argument type="service" id="event_dispatcher" />
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlRouteRegistry">
            <argument type="tagged" tag="shopware.seo_url.route"/>
        </service>

        <service id="Shopware\Core\Content\Seo\EmptyPathInfoResolver" public="true" decorates="Shopware\Core\Content\Seo\SeoResolver" decoration-priority="-2000">
            <argument type="service" id="Shopware\Core\Content\Seo\EmptyPathInfoResolver.inner"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoResolver" public="true">
            <argument type="service" id="Doctrine\DBAL\Connection"/>
        </service>

        <service id="Shopware\Core\Content\Seo\Api\SeoActionController" public="true">
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlGenerator"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlPersister"/>
            <argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\DefinitionInstanceRegistry"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlRouteRegistry"/>
            <argument type="service" id="Shopware\Core\Content\Seo\Validation\SeoUrlValidationFactory"/>
            <argument type="service" id="Shopware\Core\Framework\Validation\DataValidator"/>
            <argument type="service" id="sales_channel.repository"/>
            <argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\Search\RequestCriteriaBuilder"/>
            <argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\DefinitionInstanceRegistry"/>

            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="Shopware\Core\Content\Seo\Validation\SeoUrlValidationFactory"/>

        <service id="Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension">
            <argument type="service" id="twig.extension.routing"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlPlaceholderHandlerInterface" />
            <tag name="twig.extension"/>
        </service>

        <service id="Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension">
            <argument type="service" id="twig.extension.routing"/>
            <argument type="service" id="Shopware\Core\Content\Category\Service\CategoryUrlGenerator"/>
            <tag name="twig.extension"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlPlaceholderHandlerInterface" class="Shopware\Core\Content\Seo\SeoUrlPlaceholderHandler" public="true">
            <argument type="service" id="request_stack"/>
            <argument type="service" id="router.default"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
        </service>

        <service id="Shopware\Core\Framework\Adapter\Twig\Extension\MediaExtension">
            <argument type="service" id="media.repository" />
            <tag name="twig.extension"/>
        </service>

        <service id="Shopware\Core\Framework\Adapter\Twig\Extension\RawUrlFunctionExtension">
            <argument type="service" id="router"/>
            <argument type="service" id="request_stack"/>
            <tag name="twig.extension"/>
        </service>

        <service id="Shopware\Core\Framework\Adapter\Twig\Extension\SwSanitizeTwigFilter" public="false">
            <argument type="service" id="Shopware\Core\Framework\Util\HtmlSanitizer"/>
            <tag name="twig.extension"/>
        </service>

        <service id="Shopware\Core\Content\Seo\HreflangLoaderInterface" class="Shopware\Core\Content\Seo\HreflangLoader">
            <argument type="service" id="router.default"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SalesChannel\SeoUrlRoute" public="true">
            <argument type="service" id="sales_channel.seo_url.repository"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SalesChannel\StoreApiSeoResolver">
            <argument type="service" id="sales_channel.seo_url.repository"/>
            <argument type="service" id="Shopware\Core\Framework\DataAbstractionLayer\DefinitionInstanceRegistry"/>
            <argument type="service" id="Shopware\Core\System\SalesChannel\Entity\SalesChannelDefinitionInstanceRegistry"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlRouteRegistry"/>
            <tag name="kernel.event_subscriber"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlUpdater">
            <argument type="service" id="language.repository"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlRoute\SeoUrlRouteRegistry"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlGenerator"/>
            <argument type="service" id="Shopware\Core\Content\Seo\SeoUrlPersister"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <argument type="service" id="sales_channel.repository"/>
        </service>

        <service id="Shopware\Core\Framework\Adapter\Twig\Extension\BuildBreadcrumbExtension">
            <argument type="service" id="Shopware\Core\Content\Category\Service\CategoryBreadcrumbBuilder"/>
            <argument type="service" id="category.repository"/>
            <tag name="twig.extension"/>
        </service>

        <service id="Shopware\Core\Content\Seo\SeoUrlTwigFactory"/>

        <service id="shopware.seo_url.twig" class="Twig\Environment">
            <factory service="Shopware\Core\Content\Seo\SeoUrlTwigFactory" method="createTwigEnvironment"/>
            <argument type="service" id="slugify"/>
            <argument type="tagged" tag="shopware.seo_url.twig.extension"/>
        </service>
    </services>
</container>
