collection = $blockCollectionFactory->create(); $this->filterPool = $filterPool; } /** * Get data * * @return array */ public function getData() { if (isset($this->loadedData)) { return $this->loadedData; } $items = $this->collection->getItems(); /** @var \Magento\Search\Model\SynonymGroup $synGroup */ foreach ($items as $synGroup) { // Set the virtual 'scope_id' column to appropriate value. // This is necessary to display the correct selection set // in 'scope' field on the GUI. $synGroup->setScope(); $this->loadedData[$synGroup->getId()] = $synGroup->getData(); } return $this->loadedData; } }