/**
  * display a single event
  * 
  * @param integer $event
  * @return null
  */
 public function showAction($event)
 {
     /* don't let Extbase fetch the event
      * as you won't be able to extend the model
      * via an extension
      */
     $event = $this->eventIndexRepository->findByUid($event);
     if (empty($event)) {
         $this->throwStatus(404, 'Not found', 'The requested event could not be found.');
     }
     $this->view->assign('event', $event);
 }
Exemplo n.º 2
0
 /**
  * create the indexes
  * 
  * @param Tx_CzSimpleCal_Domain_Model_Event $event
  */
 protected function doCreate($event)
 {
     $event->setLastIndexed(new DateTime());
     $this->eventRepository->update($event);
     if (!$event->isEnabled()) {
         return;
     }
     // get all recurrances...
     foreach ($event->getRecurrances() as $recurrance) {
         // ...and store them to the repository
         $instance = Tx_CzSimpleCal_Domain_Model_EventIndex::fromArray($recurrance);
         $this->eventIndexRepository->add($instance);
     }
     // store everything to database manually to allow correct unique hash creation when using scheduler
     //		$this->persistenceManager->persistAll();
 }
 public function cleanSettings($settings)
 {
     return parent::cleanSettings($settings);
 }