当前位置: 首页>>代码示例>>PHP>>正文


PHP OC_Calendar_Object::delete方法代码示例

本文整理汇总了PHP中OC_Calendar_Object::delete方法的典型用法代码示例。如果您正苦于以下问题:PHP OC_Calendar_Object::delete方法的具体用法?PHP OC_Calendar_Object::delete怎么用?PHP OC_Calendar_Object::delete使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OC_Calendar_Object的用法示例。


在下文中一共展示了OC_Calendar_Object::delete方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

<?php

/**
 * Copyright (c) 2011 Bart Visscher <bartv@thisnet.nl>
 * This file is licensed under the Affero General Public License version 3 or
 * later.
 * See the COPYING-README file.
 */
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('calendar');
$id = $_POST['id'];
$access = OC_Calendar_App::getaccess($id, OC_Calendar_App::EVENT);
if ($access != 'owner' && $access != 'rw') {
    OCP\JSON::error(array('message' => 'permission denied'));
    exit;
}
$result = OC_Calendar_Object::delete($id);
OCP\JSON::success();
开发者ID:jaeindia,项目名称:ownCloud-Enhancements,代码行数:18,代码来源:delete.php

示例2: array

<?php

/**
 * ownCloud - Addressbook
 *
 * @author Jakob Sack
 * @copyright 2011 Jakob Sack mail@jakobsack.de
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE
 * License as published by the Free Software Foundation; either
 * version 3 of the License, or any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU AFFERO GENERAL PUBLIC LICENSE for more details.
 *
 * You should have received a copy of the GNU Affero General Public
 * License along with this library.  If not, see <http://www.gnu.org/licenses/>.
 *
 */
// Init owncloud
OCP\JSON::checkLoggedIn();
OCP\JSON::checkAppEnabled('tasks');
OCP\JSON::callCheck();
$id = $_POST['id'];
$task = OC_Calendar_App::getEventObject($id);
OC_Calendar_Object::delete($id);
OCP\JSON::success(array('data' => array('id' => $id)));
开发者ID:omusico,项目名称:isle-web-framework,代码行数:30,代码来源:delete.php

示例3: import

 public function import()
 {
     if (!$this->isValid()) {
         return false;
     }
     $numofcomponents = count($this->calobject->getComponents());
     if ($this->overwrite) {
         foreach (OC_Calendar_Object::all($this->id) as $obj) {
             OC_Calendar_Object::delete($obj['id']);
         }
     }
     foreach ($this->calobject->getComponents() as $object) {
         if (!$object instanceof Sabre\VObject\Component\VEvent && !$object instanceof Sabre\VObject\Component\VJournal && !$object instanceof Sabre\VObject\Component\VTodo) {
             continue;
         }
         if (!is_null($object->DTSTART)) {
             $dtend = OC_Calendar_Object::getDTEndFromVEvent($object);
             if ($object->DTEND) {
                 $object->DTEND->setDateTime($dtend->getDateTime(), $object->DTSTART->getDateType());
             }
         }
         $vcalendar = $this->createVCalendar($object->serialize());
         $insertid = OC_Calendar_Object::add($this->id, $vcalendar);
         $this->abscount++;
         if ($this->isDuplicate($insertid)) {
             OC_Calendar_Object::delete($insertid);
         } else {
             $this->count++;
         }
         $this->updateProgress(intval($this->abscount / $numofcomponents * 100));
     }
     OC_Cache::remove($this->progresskey);
     return true;
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:34,代码来源:import.php

示例4: p

p($_['task']);
?>
" />
	    <input type="hidden" name="title" value="<?php 
p($_POST['title']);
?>
" />
    </form>
   <?php 
if (strcmp($_['permission_granted'], 'true') == 0) {
    $event_id = OC_Collaboration_Calendar::getEventId($_POST['tid']);
    if (!isset($_POST['status'])) {
        $_POST['member'] = "";
    }
    if (isset($_POST['status']) && strcasecmp($_POST['status'], 'Cancelled') == 0) {
        OC_Calendar_Object::delete($event_id);
    } else {
        $start = new DateTime(OC_Collaboration_Calendar::getEventStartTime($event_id));
        $start->setTimezone(new DateTimeZone('Asia/Kolkata'));
        $start_date = $start->format('d-m-Y');
        $start_time = $start->format('H:i:s');
        $deadline = new DateTime(OC_Collaboration_Time::convertUITimeShortToDBTimeShort($_POST['deadline_time']));
        $deadline_date = $deadline->format('d-m-Y');
        $deadline_time = $deadline->format('H:i:s');
        $last_modified = new DateTime();
        ?>
	 <form id="ev_form" action="" method="post" >
			<input type="hidden" name="create_new" value="false" id="create_new" />
			<input type="hidden" name="id" value="<?php 
        p($event_id);
        ?>
开发者ID:TheAgentK,项目名称:owncloud-collaboration,代码行数:31,代码来源:event_edit_form.php

示例5: deleteTask

 /**
  * @NoAdminRequired
  */
 public function deleteTask()
 {
     $response = new JSONResponse();
     $taskId = $this->params('taskID');
     \OC_Calendar_Object::delete($taskId);
     return $response;
 }
开发者ID:msbt,项目名称:tasks,代码行数:10,代码来源:taskscontroller.php

示例6: delete

 /**
  * delete task by id
  * 
  * @param  int   $taskID
  * @return bool
  */
 public function delete($taskID)
 {
     return \OC_Calendar_Object::delete($taskID);
 }
开发者ID:sbambach,项目名称:tasks,代码行数:10,代码来源:tasksservice.php


注:本文中的OC_Calendar_Object::delete方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。