Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Index.php
Go to the documentation of this file.
1 <?php
7 
12 class Index extends GenericElement implements
16 {
20  const TYPE = 'index';
21 
25  const FULLTEXT_INDEX = "fulltext";
26 
30  private $table;
31 
35  private $columns;
36 
40  private $indexType;
41 
45  private $nameWithoutPrefix;
46 
57  public function __construct(
58  string $name,
59  string $type,
60  Table $table,
61  array $columns,
62  string $indexType,
63  string $nameWithoutPrefix
64  ) {
65  parent::__construct($name, $type);
66  $this->table = $table;
67  $this->columns = $columns;
68  $this->indexType = $indexType;
69  $this->nameWithoutPrefix = $nameWithoutPrefix;
70  }
71 
77  public function getColumns()
78  {
79  return $this->columns;
80  }
81 
85  public function getTable()
86  {
87  return $this->table;
88  }
89 
93  public function getDiffSensitiveParams()
94  {
95  return [
96  'type' => $this->getType(),
97  'columns' => $this->getColumnNames(),
98  'indexType' => $this->getIndexType()
99  ];
100  }
101 
107  public function getColumnNames()
108  {
109  return array_map(
110  function (Column $column) {
111  return $column->getName();
112  },
113  $this->getColumns()
114  );
115  }
116 
120  public function getElementType()
121  {
122  return self::TYPE;
123  }
124 
130  public function getIndexType()
131  {
132  return $this->indexType;
133  }
134 
140  public function getNameWithoutPrefix()
141  {
142  return $this->nameWithoutPrefix;
143  }
144 }
__construct(string $name, string $type, Table $table, array $columns, string $indexType, string $nameWithoutPrefix)
Definition: Index.php:57
$columns
Definition: default.phtml:15
$type
Definition: item.phtml:13
$table
Definition: trigger.php:14
if(!isset($_GET['name'])) $name
Definition: log.php:14