Ejemplo n.º 1
0
 /**
  * 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);
         }
     }
 }
Ejemplo n.º 2
0
 /**
  * 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);
         }
     }
 }
Ejemplo n.º 3
0
 /**
  * {@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);
     }
 }