config = $config; $this->statesFactory = $statesFactory; parent::__construct($entityFactory); } /** * Load data * * @param bool $printQuery * @param bool $logQuery * @return \Magento\Indexer\Model\Indexer\Collection * * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function loadData($printQuery = false, $logQuery = false) { if (!$this->isLoaded()) { $states = $this->statesFactory->create(); foreach (array_keys($this->config->getIndexers()) as $indexerId) { /** @var IndexerInterface $indexer */ $indexer = $this->getNewEmptyItem(); $indexer->load($indexerId); foreach ($states->getItems() as $state) { /** @var \Magento\Indexer\Model\Indexer\State $state */ if ($state->getIndexerId() == $indexerId) { $indexer->setState($state); break; } } $this->_addItem($indexer); } $this->_setIsLoaded(true); } return $this; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. */ public function getAllIds() { $ids = []; foreach ($this->getItems() as $item) { $ids[] = $item->getId(); } return $ids; } /** * @inheritdoc * @return IndexerInterface[] */ public function getItems() { return parent::getItems(); } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getColumnValues($colName) { return []; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getItemsByColumnValue($column, $value) { return []; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function getItemByColumnValue($column, $value) { return null; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setDataToAll($key, $value = null) { return $this; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function setItemObjectClass($className) { return $this; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. */ public function toXml() { return ''; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ public function toArray($arrRequiredFields = []) { return []; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. */ public function toOptionArray() { return []; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. */ public function toOptionHash() { return []; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _toOptionArray($valueField = 'id', $labelField = 'name', $additional = []) { return []; } /** * {@inheritdoc} Prevents handle collection items as DataObject class instances. * @deprecated 100.2.0 Should not be used in the current implementation. * @SuppressWarnings(PHPMD.UnusedFormalParameter) */ protected function _toOptionHash($valueField = 'id', $labelField = 'name') { return []; } }