/** * @test * @return void */ public function getFieldsReturnsGivenValueIfSet() { $this->subject->setFields('Field1,Field2'); $this->assertEquals('Field1,Field2', $this->subject->getFields()); }
/** * List action for backend module * * @param \DERHANSEN\SfEventMgt\Domain\Model\Dto\SearchDemand $searchDemand SearchDemand * @param int $messageId MessageID * * @return void */ public function listAction(SearchDemand $searchDemand = null, $messageId = null) { /** @var EventDemand $demand */ $demand = $this->objectManager->get('DERHANSEN\\SfEventMgt\\Domain\\Model\\Dto\\EventDemand'); if ($searchDemand !== null) { $searchDemand->setFields($this->settings['search']['fields']); } $demand->setSearchDemand($searchDemand); if ($this->pid > 0) { $demand->setStoragePage($this->pid); } if ($messageId !== null && is_numeric($messageId)) { $this->view->assign('showMessage', true); $this->view->assign('messageTitleKey', 'administration.message-' . $messageId . '.title'); $this->view->assign('messageContentKey', 'administration.message-' . $messageId . '.content'); } $events = $this->eventRepository->findDemanded($demand); $this->view->assign('events', $events); $this->view->assign('searchDemand', $searchDemand); }