Beispiel #1
0
 /**
  * add the model id to an EventIndex
  * 
  * @param array $array
  * @return array
  */
 protected function addEvent($array)
 {
     $array['event'] = $this->event;
     $array['pid'] = $this->event->getPid();
     return $array;
 }
 /**
  * log if an event was created/updated/deleted to make this transparent in the backend
  *
  * @param Tx_CzSimpleCal_Domain_Model_Event $event
  * @param string $action the action (one of 1->'new', 2->'updated', 3->'delete')
  */
 protected function logEventLifecycle($event, $action)
 {
     $user = t3lib_div::makeInstance('t3lib_userAuthGroup');
     $actions = array(1 => 'added', 2 => 'edited', 3 => 'deleted');
     $user->writelog(1, $action, 0, 0, 'fe_user "%s" (%s) ' . $actions[$action] . ' the event "%s" (%s).', array($GLOBALS['TSFE']->fe_user->user['username'], $GLOBALS['TSFE']->fe_user->user['uid'], $event->getTitle(), $event->getUid()), 'tx_czsimplecal_domain_model_event', $event->getUid(), null, $event->getPid());
 }