當前位置: 首頁>>代碼示例>>PHP>>正文


PHP OC_Calendar_Calendar::touchCalendar方法代碼示例

本文整理匯總了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) {
    }
}
開發者ID:WeatherellTechnology,項目名稱:weatherstorm7,代碼行數:31,代碼來源:update.php

示例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;
 }
開發者ID:omusico,項目名稱:isle-web-framework,代碼行數:15,代碼來源:object.php

示例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


注:本文中的OC_Calendar_Calendar::touchCalendar方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。