/**
  * prepares an exception instance for persistence
  * 
  * @param  Calendar_Model_Event $_baseEvent
  * @param  Calendar_Model_Event $_exception
  * @return void
  * @throws Tinebase_Exception_InvalidArgument
  */
 protected function _prepareException(Calendar_Model_Event $_baseEvent, Calendar_Model_Event $_exception)
 {
     if (!$_baseEvent->uid) {
         throw new Tinebase_Exception_InvalidArgument('base event has no uid');
     }
     if ($_exception->is_deleted == false) {
         $_exception->container_id = $_baseEvent->container_id;
     }
     $_exception->uid = $_baseEvent->uid;
     $_exception->base_event_id = $_baseEvent->getId();
     $_exception->recurid = $_baseEvent->uid . '-' . $_exception->getOriginalDtStart()->format(Tinebase_Record_Abstract::ISO8601LONG);
     // NOTE: we always refetch the base event as it might be touched in the meantime
     $currBaseEvent = $this->_eventController->get($_baseEvent, null, false);
     $_exception->last_modified_time = $currBaseEvent->last_modified_time;
 }
예제 #2
0
 /**
  * get by id
  *
  * @param string $_id
  * @return Calendar_Model_Event
  * @throws  Tinebase_Exception_AccessDenied
  */
 public function get($_id)
 {
     $event = $this->_eventController->get($_id);
     return $this->_toiTIP($event);
 }