/** * Get data * * @return array */ public function getData() { if (isset($this->loadedData)) { return $this->loadedData; } $stores = $this->systemStore->getStoreOptionHash(); $stores[0] = __('All Store Views'); $items = $this->collection->getItems(); /** @var \Swissup\Core\Model\Module $module */ foreach ($items as $module) { $result['general'] = $module->getData(); $oldStores = implode("\n", array_intersect_key($stores, array_flip($module->getOldStores()))); if (!$oldStores) { $oldStores = __('None'); } $result['general']['store_labels'] = $oldStores; $this->loadedData[$module->getCode()] = $result; } return $this->loadedData; }
/** * Return store array * * @return array */ public function toOptionArray() { return $this->_systemStore->getStoreOptionHash(); }