Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Member Functions | Protected Attributes
Flat Class Reference
Inheritance diagram for Flat:
ActionInterface ActionInterface

Public Member Functions

 __construct (\Magento\Catalog\Model\Indexer\Product\Flat\Action\Row $productFlatIndexerRow, \Magento\Catalog\Model\Indexer\Product\Flat\Action\Rows $productFlatIndexerRows, \Magento\Catalog\Model\Indexer\Product\Flat\Action\Full $productFlatIndexerFull)
 
 execute ($ids)
 
 executeFull ()
 
 executeList (array $ids)
 
 executeRow ($id)
 

Protected Member Functions

 getCacheContext ()
 

Protected Attributes

 $_productFlatIndexerRow
 
 $_productFlatIndexerRows
 
 $_productFlatIndexerFull
 

Detailed Description

Definition at line 10 of file Flat.php.

Constructor & Destructor Documentation

◆ __construct()

Parameters
Flat\Action\Row$productFlatIndexerRow
Flat\Action\Rows$productFlatIndexerRows
Flat\Action\Full$productFlatIndexerFull

Definition at line 37 of file Flat.php.

41  {
42  $this->_productFlatIndexerRow = $productFlatIndexerRow;
43  $this->_productFlatIndexerRows = $productFlatIndexerRows;
44  $this->_productFlatIndexerFull = $productFlatIndexerFull;
45  }

Member Function Documentation

◆ execute()

execute (   $ids)

Execute materialization on ids entities

Parameters
int[]$ids
Returns
void

Implements ActionInterface.

Definition at line 53 of file Flat.php.

54  {
55  $this->_productFlatIndexerRows->execute($ids);
56  $this->getCacheContext()->registerEntities(\Magento\Catalog\Model\Product::CACHE_TAG, $ids);
57  }

◆ executeFull()

executeFull ( )

Execute full indexation

Returns
void

Implements ActionInterface.

Definition at line 64 of file Flat.php.

65  {
66  $this->_productFlatIndexerFull->execute();
67  $this->getCacheContext()->registerTags(
68  [
69  \Magento\Catalog\Model\Category::CACHE_TAG,
70  \Magento\Catalog\Model\Product::CACHE_TAG
71  ]
72  );
73  }

◆ executeList()

executeList ( array  $ids)

Execute partial indexation by ID list

Parameters
int[]$ids
Returns
void

Implements ActionInterface.

Definition at line 81 of file Flat.php.

82  {
83  $this->_productFlatIndexerRows->execute($ids);
84  }

◆ executeRow()

executeRow (   $id)

Execute partial indexation by ID

Parameters
int$id
Returns
void

Implements ActionInterface.

Definition at line 92 of file Flat.php.

93  {
94  $this->_productFlatIndexerRow->execute($id);
95  }
$id
Definition: fieldset.phtml:14

◆ getCacheContext()

getCacheContext ( )
protected

Get cache context

Returns
\Magento\Framework\Indexer\CacheContext
Deprecated:
100.0.11

Definition at line 103 of file Flat.php.

104  {
105  if (!($this->cacheContext instanceof CacheContext)) {
106  return \Magento\Framework\App\ObjectManager::getInstance()->get(CacheContext::class);
107  } else {
108  return $this->cacheContext;
109  }
110  }

Field Documentation

◆ $_productFlatIndexerFull

$_productFlatIndexerFull
protected

Definition at line 25 of file Flat.php.

◆ $_productFlatIndexerRow

$_productFlatIndexerRow
protected

Definition at line 15 of file Flat.php.

◆ $_productFlatIndexerRows

$_productFlatIndexerRows
protected

Definition at line 20 of file Flat.php.


The documentation for this class was generated from the following file: