_authorFactory = $authorFactory; } /** * @return array */ public function toOptionArray() { $options = []; foreach ($this->getAuthors() as $value => $author) { $options[] = [ 'value' => $value, 'label' => $author->getName() ]; } return $options; } /** * @return AbstractCollection */ public function getAuthors() { return $this->_authorFactory->create()->getCollection()->addFieldToFilter('status', '1'); } }