85 parent::__construct(
$data);
97 return $this->
getData($this->_idFieldName);
124 $this->_idFieldName =
$name;
147 return $this->
getData(
'view_id');
157 return $this->
getData(
'action_class');
167 return $this->
getData(
'title');
177 return $this->
getData(
'description');
187 return $this->
getData(
'fields');
197 return $this->
getData(
'sources');
207 return $this->
getData(
'handlers');
217 public function load($indexerId)
219 $indexer = $this->config->getIndexer($indexerId);
221 throw new \InvalidArgumentException(
"{$indexerId} indexer does not exist.");
224 $this->
setId($indexerId);
237 if (!$this->view->getId()) {
251 $this->state = $this->stateFactory->create();
252 $this->state->loadByIndexer($this->
getId());
276 return $this->
getView()->isEnabled();
290 $this->
getView()->unsubscribe();
344 return $this->
getState()->getStatus();
354 if ($this->
getView()->isEnabled() && $this->
getView()->getUpdated()) {
355 if (!$this->
getState()->getUpdated()) {
356 return $this->
getView()->getUpdated();
358 $indexerUpdatedDate = new \DateTime($this->
getState()->getUpdated());
359 $viewUpdatedDate = new \DateTime($this->
getView()->getUpdated());
360 if ($viewUpdatedDate > $indexerUpdatedDate) {
361 return $this->
getView()->getUpdated();
364 return $this->
getState()->getUpdated();
375 return $this->actionFactory->create(
391 if (!$this->
getData(
'structure')) {
394 return $this->structureFactory->create($this->
getData(
'structure'));
409 if ($this->
getView()->isEnabled()) {
417 }
catch (\Throwable $exception) {
getData($key='', $index=null)
__construct(ConfigInterface $config, ActionFactory $actionFactory, StructureFactory $structureFactory, \Magento\Framework\Mview\ViewInterface $view, Indexer\StateFactory $stateFactory, Indexer\CollectionFactory $indexersFactory, array $data=[])
setState(StateInterface $state)
setData($key, $value=null)
if(!isset($_GET['name'])) $name