Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-catalog-optimizer/etc/adminhtml/di.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<!--
/**
 * Smile_ElasticsuiteCatalogOptimizer dependency injection configuration.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade Smile ElasticSuite to newer
 * versions in the future.
 *
 * @category  Smile
 * @package   Smile\ElasticsuiteCatalogOptimizer
 * @author    Romain Ruaud <romain.ruaud@smile.fr>
 * @copyright 2020 Smile
 * @license   Open Software License ("OSL") v. 3.0
 */
 -->
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">

    <virtualType name="Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\Modifier\Pool" type="Magento\Ui\DataProvider\Modifier\Pool">
        <arguments>
            <argument name="modifiers" xsi:type="array">
                <item name="limitation" xsi:type="array">
                    <item name="class" xsi:type="string">Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\Modifier\Limitation</item>
                    <item name="sortOrder" xsi:type="number">10</item>
                </item>
                <item name="search_terms" xsi:type="array">
                    <item name="class" xsi:type="string">Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\Modifier\SearchTerms</item>
                    <item name="sortOrder" xsi:type="number">20</item>
                </item>
                <item name="preview" xsi:type="array">
                    <item name="class" xsi:type="string">Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\Modifier\Preview</item>
                    <item name="sortOrder" xsi:type="number">30</item>
                </item>
            </argument>
        </arguments>
    </virtualType>

    <type name="Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\DataProvider">
        <arguments>
            <argument name="modifierPool" xsi:type="object">Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\Modifier\Pool</argument>
        </arguments>
    </type>

    <type name="Smile\ElasticsuiteCatalogOptimizer\Model\Optimizer\OptimizerFilterInterface">
        <plugin name="optimizer_limitation_preview" type="Smile\ElasticsuiteCatalogOptimizer\Plugin\Adminhtml\OptimizerFilter"/>
    </type>

    <type name="Smile\ElasticsuiteCatalogOptimizer\Model\Optimizer\Copier">
        <arguments>
            <argument name="modifierPool" xsi:type="object">Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Form\Modifier\Pool</argument>
        </arguments>
    </type>

    <type name="Smile\ElasticsuiteCatalogOptimizer\Ui\Component\Optimizer\Listing\DataProvider">
        <arguments>
            <argument name="addFieldStrategies" xsi:type="array">
                <item name="boost_weight" xsi:type="object">Smile\ElasticsuiteCatalogOptimizer\Ui\DataProvider\AddConfigField</item>
                <item name="search_container" xsi:type="object">Smile\ElasticsuiteCatalogOptimizer\Ui\DataProvider\SearchContainerFieldManager</item>
            </argument>
            <argument name="addFilterStrategies" xsi:type="array">
                <item name="search_container" xsi:type="object">Smile\ElasticsuiteCatalogOptimizer\Ui\DataProvider\SearchContainerFieldManager</item>
            </argument>
        </arguments>
    </type>

    <type name="Smile\ElasticsuiteCatalogOptimizer\Controller\Adminhtml\Optimizer\Preview">
        <arguments>
            <argument name="categoryPreviewContainers" xsi:type="array">
                <item name="catalog_view_container" xsi:type="string">catalog_view_container</item>
            </argument>
        </arguments>
    </type>

    <type name="Smile\ElasticsuiteCatalogOptimizer\Model\Optimizer\Preview">
        <arguments>
            <argument name="categoryPreviewContainers" xsi:type="array">
                <item name="catalog_view_container" xsi:type="string">catalog_view_container</item>
            </argument>
        </arguments>
    </type>

</config>