<?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="RiccardoManuals\Core\Content\Manual\ManualDefinition">
            <tag name="shopware.entity.definition" entity="riccardo_manual"/>
        </service>
        <service id="RiccardoManuals\Core\Content\Manual\Aggregate\ManualProduct\ManualProductDefinition">
            <tag name="shopware.entity.definition" entity="riccardo_manual_product"/>
        </service>

        <service id="RiccardoManuals\Core\Content\Manual\ManualFinder">
            <argument type="service" id="riccardo_manual.repository"/>
        </service>

        <service id="RiccardoManuals\Storefront\Controller\ManualController" public="true">
            <argument type="service" id="Shopware\Storefront\Page\GenericPageLoader"/>
            <argument type="service" id="RiccardoManuals\Core\Content\Manual\ManualFinder"/>
            <argument type="service" id="riccardo_manual.repository"/>
            <argument type="service" id="product_manufacturer.repository"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <call method="setContainer">
                <argument type="service" id="service_container"/>
            </call>
        </service>

        <service id="RiccardoManuals\Storefront\Page\ProductManualsSubscriber">
            <argument type="service" id="RiccardoManuals\Core\Content\Manual\ManualFinder"/>
            <tag name="kernel.event_subscriber"/>
        </service>

        <service id="RiccardoManuals\Command\ImportManualsCommand">
            <argument type="service" id="riccardo_manual.repository"/>
            <argument type="service" id="Shopware\Core\Content\Media\MediaService"/>
            <argument type="service" id="media_folder.repository"/>
            <argument type="service" id="Doctrine\DBAL\Connection"/>
            <tag name="console.command"/>
        </service>
    </services>
</container>
