コード例 #1
0
ファイル: Data.php プロジェクト: pavelnovitsky/magento2
 /**
  * Invalidate Indexer
  *
  * @return $this
  */
 public function invalidateIndexer()
 {
     foreach ($this->_processFactory->create() as $process) {
         $process->changeStatus(\Magento\Index\Model\Process::STATUS_REQUIRE_REINDEX);
     }
     return $this;
 }
コード例 #2
0
ファイル: Indexer.php プロジェクト: aiesh/magento2
 /**
  * @return \Magento\Index\Model\Resource\Process\Collection
  */
 private function _createCollection()
 {
     return $this->_collectionFactory->create();
 }
コード例 #3
0
ファイル: Grid.php プロジェクト: aiesh/magento2
 /**
  * Prepare grid collection
  *
  * @return $this
  */
 protected function _prepareCollection()
 {
     $this->setCollection($this->_collectionFactory->create());
     parent::_prepareCollection();
     return $this;
 }