Exemplo n.º 1
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();
 }