本文整理匯總了PHP中OC_Calendar_Calendar::touchCalendar方法的典型用法代碼示例。如果您正苦於以下問題:PHP OC_Calendar_Calendar::touchCalendar方法的具體用法?PHP OC_Calendar_Calendar::touchCalendar怎麽用?PHP OC_Calendar_Calendar::touchCalendar使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OC_Calendar_Calendar
的用法示例。
在下文中一共展示了OC_Calendar_Calendar::touchCalendar方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
}
$data = $vcalendar->serialize();
$oldobject = \OC_Calendar_Object::find($taskId);
$object = \OC_VObject::parse($data);
$type = 'VTODO';
$startdate = null;
$enddate = null;
$summary = '';
$repeating = 0;
$uid = null;
foreach ($object->children as $property) {
if ($property->name == 'VTODO') {
foreach ($property->children as &$element) {
if ($element->name == 'SUMMARY') {
$summary = $element->value;
} elseif ($element->name == 'UID') {
$uid = $element->value;
}
}
break;
}
}
$stmt = OCP\DB::prepare('UPDATE `*PREFIX*clndr_objects` SET `objecttype`=?,`startdate`=?,`enddate`=?,`repeating`=?,`summary`=?,`calendardata`=?,`lastmodified`= ? WHERE `id` = ?');
$stmt->execute(array($type, $startdate, $enddate, $repeating, $summary, $data, time(), $taskId));
\OC_Calendar_Calendar::touchCalendar($oldobject['calendarid']);
}
}
}
} catch (\Exception $e) {
}
}
示例2: moveToCalendar
public static function moveToCalendar($id, $calendarid)
{
$calendar = OC_Calendar_Calendar::find($calendarid);
if ($calendar['userid'] != OCP\User::getUser()) {
$sharedCalendar = OCP\Share::getItemSharedWithBySource('calendar', $calendarid);
if (!$sharedCalendar || !($sharedCalendar['permissions'] & OCP\PERMISSION_DELETE)) {
throw new Exception(OC_Calendar_App::$l10n->t('You do not have the permissions to add events to this calendar.'));
}
}
$stmt = OCP\DB::prepare('UPDATE `*PREFIX*clndr_objects` SET `calendarid`=? WHERE `id`=?');
$stmt->execute(array($calendarid, $id));
OC_Calendar_Calendar::touchCalendar($calendarid);
OCP\Util::emitHook('OC_Calendar', 'moveEvent', $id);
return true;
}
示例3: moveToCalendar
public static function moveToCalendar($id, $calendarid)
{
$stmt = OC_DB::prepare('UPDATE *PREFIX*calendar_objects SET calendarid=? WHERE id = ?');
$result = $stmt->execute(array($calendarid, $id));
OC_Calendar_Calendar::touchCalendar($id);
return true;
}
開發者ID:Teino1978-Corp,項目名稱:Teino1978-Corp-owncloud_.htaccess-,代碼行數:7,代碼來源:owncloud_apps_calendar_lib_object.php