/** * Process flat enabled mode change * * @return void */ public function processValue() { if ((bool) $this->getValue() != (bool) $this->getOldValue()) { if ((bool) $this->getValue()) { $this->indexerState->loadByIndexer(\Magento\Catalog\Model\Indexer\Product\Flat\Processor::INDEXER_ID); $this->indexerState->setStatus(\Magento\Framework\Indexer\StateInterface::STATUS_INVALID); $this->indexerState->save(); } else { $this->_productFlatIndexerProcessor->getIndexer()->setScheduled(false); } } }
/** * Process flat enabled mode change * * @return void */ public function processValue() { if ((bool) $this->getValue() != (bool) $this->getOldValue()) { if ((bool) $this->getValue()) { $this->indexerState->loadByIndexer(\Magento\Catalog\Model\Indexer\Category\Flat\State::INDEXER_ID); $this->indexerState->setStatus(\Magento\Indexer\Model\Indexer\State::STATUS_INVALID); $this->indexerState->save(); } else { $this->indexerRegistry->get(\Magento\Catalog\Model\Indexer\Category\Flat\State::INDEXER_ID)->setScheduled(false); } } }
/** * {@inheritdoc} */ public function save() { $pluginInfo = $this->pluginList->getNext($this->subjectType, 'save'); if (!$pluginInfo) { return parent::save(); } else { return $this->___callPlugins('save', func_get_args(), $pluginInfo); } }