Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
IndexStructureProxy.php
Go to the documentation of this file.
1 <?php
7 
9 
14 {
18  private $indexStructureEntity;
19 
23  private $indexStructureFactory;
24 
28  public function __construct(
29  IndexStructureFactory $indexStructureFactory
30  ) {
31  $this->indexStructureFactory = $indexStructureFactory;
32  }
33 
37  public function delete(
38  $index,
39  array $dimensions = []
40  ) {
41  return $this->getEntity()->delete($index, $dimensions);
42  }
43 
47  public function create(
48  $index,
49  array $fields,
50  array $dimensions = []
51  ) {
52  return $this->getEntity()->create($index, $fields, $dimensions);
53  }
54 
60  private function getEntity()
61  {
62  if (empty($this->indexStructureEntity)) {
63  $this->indexStructureEntity = $this->indexStructureFactory->create();
64  }
65  return $this->indexStructureEntity;
66  }
67 }
$fields
Definition: details.phtml:14
create( $index, array $fields, array $dimensions=[])
__construct(IndexStructureFactory $indexStructureFactory)
$index
Definition: list.phtml:44