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
Model
Rule
Job.php
Go to the documentation of this file.
1
<?php
11
namespace
Magento\CatalogRule\Model\Rule
;
12
13
use
Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor
;
14
30
class
Job
extends
\Magento\Framework\DataObject
31
{
35
protected
$ruleProcessor
;
36
43
public
function
__construct
(
44
RuleProductProcessor
$ruleProcessor
,
45
array
$data
= []
46
) {
47
$this->ruleProcessor =
$ruleProcessor
;
48
parent::__construct(
$data
);
49
}
50
57
public
function
applyAll
()
58
{
59
try
{
60
$this->ruleProcessor->markIndexerAsInvalid();
61
$this->setSuccess(
__
(
'Updated rules applied.'
));
62
}
catch
(\
Magento
\Framework\
Exception
\
LocalizedException
$e) {
63
$this->setError($e->getMessage());
64
}
65
return
$this;
66
}
67
}
Magento\CatalogRule\Model\Rule\Job\__construct
__construct(RuleProductProcessor $ruleProcessor, array $data=[])
Definition:
Job.php:43
Magento\Framework\Exception\LocalizedException
Definition:
LocalizedException.php:17
Magento\CatalogRule\Model\Rule
__
__()
Definition:
__.php:13
Magento\Framework\DataObject
Definition:
DataObject.php:15
Magento\CatalogRule\Model\Indexer\Rule\RuleProductProcessor
Definition:
RuleProductProcessor.php:10
Magento\Catalog\Model\Product\Exception
Definition:
Exception.php:14
$data
$data
Definition:
attribute_set_with_image_attribute.php:16
Magento\CatalogRule\Model\Rule\Job\$ruleProcessor
$ruleProcessor
Definition:
Job.php:35
Magento\CatalogRule\Model\Rule\Job
Definition:
Job.php:30
Magento
Magento\CatalogRule\Model\Rule\Job\applyAll
applyAll()
Definition:
Job.php:57