Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
module-catalog-rule
Plugin
Indexer
Category.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CatalogRule\Plugin\Indexer
;
7
8
use
Magento\CatalogRule\Model\Indexer\Product\ProductRuleProcessor
;
9
10
class
Category
11
{
15
protected
$productRuleProcessor
;
16
20
public
function
__construct
(
21
ProductRuleProcessor
$productRuleProcessor
22
) {
23
$this->productRuleProcessor =
$productRuleProcessor
;
24
}
25
33
public
function
afterSave(
34
\
Magento
\Catalog\Model\
Category
$subject,
35
\
Magento
\Catalog\Model\
Category
$result
36
) {
38
$productIds
=
$result
->getChangedProductIds();
39
if
(!empty(
$productIds
) && !$this->productRuleProcessor->isIndexerScheduled()) {
40
$this->productRuleProcessor->reindexList(
$productIds
);
41
}
42
return
$result
;
43
}
44
52
public
function
afterDelete
(
53
\
Magento
\Catalog\Model\
Category
$subject,
54
\
Magento
\Catalog\Model\
Category
$result
55
) {
56
$this->productRuleProcessor->markIndexerAsInvalid();
57
return
$result
;
58
}
59
}
$result
$result
Definition:
product_configurable_not_available_rollback.php:26
Magento\CatalogRule\Plugin\Indexer
Definition:
Category.php:6
Magento\CatalogRule\Plugin\Indexer\Category\afterDelete
afterDelete(\Magento\Catalog\Model\Category $subject, \Magento\Catalog\Model\Category $result)
Definition:
Category.php:52
Magento\CatalogRule\Plugin\Indexer\Category\$productRuleProcessor
$productRuleProcessor
Definition:
Category.php:15
Magento
Magento\CatalogRule\Plugin\Indexer\Category\__construct
__construct(ProductRuleProcessor $productRuleProcessor)
Definition:
Category.php:20
Magento\CatalogRule\Plugin\Indexer\Category
Definition:
Category.php:10
$productIds
$productIds
Definition:
product_with_multiple_options.php:11
Magento\CatalogRule\Model\Indexer\Product\ProductRuleProcessor
Definition:
ProductRuleProcessor.php:10