コード例 #1
0
 /**
  * @test
  * @return void
  */
 public function getHasQueryReturnsTrueIfEndDateSet()
 {
     $this->subject->setEndDate(new \DateTime());
     $this->assertEquals(true, $this->subject->getHasQuery());
 }
コード例 #2
0
 /**
  * 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);
 }