本文整理汇总了PHP中Kronolith::sendNotification方法的典型用法代码示例。如果您正苦于以下问题:PHP Kronolith::sendNotification方法的具体用法?PHP Kronolith::sendNotification怎么用?PHP Kronolith::sendNotification使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Kronolith
的用法示例。
在下文中一共展示了Kronolith::sendNotification方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _handleNotifications
/**
* Wrapper for sending notifications, so that we can overwrite this action
* in Kronolith_Driver_Resource.
*
* @param Kronolith_Event $event
* @param string $action
*/
protected function _handleNotifications(Kronolith_Event $event, $action)
{
Kronolith::sendNotification($event, $action);
}
示例2: _saveEvent
/**
* Saves an event in the backend.
*
* @param Kronolith_Event $event The event to save.
*
* @return string The event id.
* @throws Horde_Mime_Exception
*/
protected function _saveEvent($event, $edit)
{
$this->synchronize();
$action = $edit ? array('action' => 'modify') : array('action' => 'add');
if (!$event->uid) {
$event->uid = $this->_data->generateUID();
$event->id = Horde_Url::uriB64Encode($event->uid);
}
$object = $event->toKolab();
if ($edit) {
$this->_data->modify($object);
} else {
$this->_data->create($object);
}
/* Deal with tags */
if ($edit) {
$this->_updateTags($event);
} else {
$this->_addTags($event);
}
/* Notify about the changed event. */
Kronolith::sendNotification($event, $edit ? 'edit' : 'add');
/* Log the creation/modification of this item in the history log. */
try {
$GLOBALS['injector']->getInstance('Horde_History')->log('kronolith:' . $event->calendar . ':' . $event->uid, $action, true);
} catch (Exception $e) {
Horde::log($e, 'ERR');
}
// refresh IMAP cache
$this->synchronize(true);
if (is_callable('Kolab', 'triggerFreeBusyUpdate')) {
//Kolab::triggerFreeBusyUpdate($this->_data->parseFolder($event->calendar));
}
return $event->id;
}