/** * Get data * * @param NodeInterface $node The node that is currently edited (optional) * @param array $arguments Additional arguments (key / value) * @return mixed JSON serializable data * @api */ public function getData(NodeInterface $node = NULL, array $arguments) { $result = array(); $result[''] = array('label' => 'Please select a receiver group'); foreach ($this->receiverGroupRepository->findAll() as $receiverGroup) { /* @var $receiverGroup \Sandstorm\Newsletter\Domain\Model\ReceiverGroup */ $result[$this->persistenceManager->getIdentifierByObject($receiverGroup)] = array('label' => $receiverGroup->getFullLabel()); } return $result; }