PHP Class Smile\ElasticsuiteVirtualCategory\Plugin\Catalog\Category\FlatPlugin

Author: Romain Ruaud ([email protected])
Show file Open project: smile-sa/elasticsuite

Public Methods

Method Description
aroundLoad ( Magento\Catalog\Model\ResourceModel\Category\Flat $categoryResource, Closure $proceed, Magento\Framework\DataObject $category, string $value, null $field = null ) Process correct loading of virtual rule when loading a category via the Flat Resource Built around load() method because the afterLoad() Resource method is only triggered when using the EntityManager, and is not triggered when calling load() method on model explicitely.

Method Details

aroundLoad() public method

Process correct loading of virtual rule when loading a category via the Flat Resource Built around load() method because the afterLoad() Resource method is only triggered when using the EntityManager, and is not triggered when calling load() method on model explicitely.
public aroundLoad ( Magento\Catalog\Model\ResourceModel\Category\Flat $categoryResource, Closure $proceed, Magento\Framework\DataObject $category, string $value, null $field = null )
$categoryResource Magento\Catalog\Model\ResourceModel\Category\Flat Flat Category Resource
$proceed Closure Flat Category legacy load() method
$category Magento\Framework\DataObject The category being loaded
$value string The value
$field null Field to process loading on