Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Job.php
Go to the documentation of this file.
1 <?php
12 
14 
31 {
35  protected $ruleProcessor;
36 
43  public function __construct(
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 }
__construct(RuleProductProcessor $ruleProcessor, array $data=[])
Definition: Job.php:43
__()
Definition: __.php:13