Smile-SA/elasticsuite

View on GitHub
src/module-elasticsuite-virtual-category/etc/events.xml

Summary

Maintainability
Test Coverage
<?xml version="1.0"?>
<!--
/**
 * Smile_ElasticsuiteVirtualCategory event manager 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\ElasticsuiteVirtualCategory
 * @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:Event/etc/events.xsd">
    <event name="catalog_category_collection_load_before">
        <observer name="smile_elasticsuite_virtual_categories_collection_load_before" instance="Smile\ElasticsuiteVirtualCategory\Observer\AddCategoryAttributesToSelect"/>
    </event>

    <event name="catalog_category_move_before">
        <observer name="smile_elasticsuite_virtual_categories_move_before" instance="Smile\ElasticsuiteVirtualCategory\Observer\MoveVirtualCategoryRoot"/>
    </event>

    <event name="magento_catalog_api_data_categoryinterface_save_before">
        <observer name="smile_elasticsuite_virtual_categories_before_save" instance="Smile\ElasticsuiteVirtualCategory\Observer\ConvertVirtualRuleOnSave" />
    </event>
</config>