本文整理匯總了PHP中Magento\Catalog\Model\Indexer\Product\Flat\Processor::reindexRow方法的典型用法代碼示例。如果您正苦於以下問題:PHP Processor::reindexRow方法的具體用法?PHP Processor::reindexRow怎麽用?PHP Processor::reindexRow使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Magento\Catalog\Model\Indexer\Product\Flat\Processor
的用法示例。
在下文中一共展示了Processor::reindexRow方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: testReindexRowForce
public function testReindexRowForce()
{
$id = 1;
$this->_stateMock->expects($this->once())->method('isFlatEnabled')->willReturn(true);
$indexerMock = $this->getMockBuilder('Magento\\Indexer\\Model\\Indexer')->disableOriginalConstructor()->getMock();
$this->indexerRegistryMock->expects($this->any())->method('get')->with(Processor::INDEXER_ID)->willReturn($indexerMock);
$indexerMock->expects($this->any())->method('isScheduled')->willReturn(true);
$indexerMock->expects($this->any())->method('reindexList')->with($id)->willReturnSelf();
$this->_model->reindexRow($id, true);
}
示例2: reindex
/**
* Init indexing process after product save
*
* @return void
*/
public function reindex()
{
if ($this->_catalogProduct->isDataForProductCategoryIndexerWasChanged($this) || $this->isDeleted()) {
$productCategoryIndexer = $this->indexerRegistry->get(Indexer\Product\Category::INDEXER_ID);
if (!$productCategoryIndexer->isScheduled()) {
$productCategoryIndexer->reindexRow($this->getId());
}
}
$this->_productFlatIndexerProcessor->reindexRow($this->getEntityId());
}
示例3: reindex
/**
* Init indexing process after product save
*
* @return void
*/
public function reindex()
{
$this->_productFlatIndexerProcessor->reindexRow($this->getEntityId());
if (!$this->getCategoryIndexer()->isScheduled()) {
$this->getCategoryIndexer()->reindexRow($this->getId());
}
}