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


PHP Agenda::deleteEvent方法代码示例

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


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

示例1: explode

 case 'edit_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $agenda->editEvent($id, $_REQUEST['start'], $_REQUEST['end'], $_REQUEST['all_day'], $_REQUEST['title'], $_REQUEST['content']);
     break;
 case 'delete_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $id_list = explode('_', $_REQUEST['id']);
     $id = $id_list[1];
     $deleteAllEventsFromSerie = isset($_REQUEST['delete_all_events']) ? true : false;
     $agenda->deleteEvent($id, $deleteAllEventsFromSerie);
     break;
 case 'resize_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
     $day_delta = $_REQUEST['day_delta'];
     $minute_delta = $_REQUEST['minute_delta'];
     $id = explode('_', $_REQUEST['id']);
     $id = $id[1];
     $agenda->resizeEvent($id, $day_delta, $minute_delta);
     break;
 case 'move_event':
     if (!api_is_allowed_to_edit(null, true) && $type == 'course') {
         break;
     }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.ajax.php

示例2: isset

 $event['action'] = 'edit';
 $event['id'] = $eventId;
 $form = $agenda->getForm($event);
 if ($form->validate()) {
     $values = $form->getSubmitValues();
     $allDay = isset($values['all_day']) ? 'true' : 'false';
     $sendEmail = isset($values['add_announcement']) ? true : false;
     $startDate = $values['date_range_start'];
     $endDate = $values['date_range_end'];
     $sendAttachment = isset($_FILES) && !empty($_FILES) ? true : false;
     $attachmentList = $sendAttachment ? $_FILES : null;
     $attachmentCommentList = isset($values['legend']) ? $values['legend'] : null;
     $comment = isset($values['comment']) ? $values['comment'] : null;
     // This is a sub event. Delete the current and create another BT#7803
     if (!empty($event['parent_event_id'])) {
         $agenda->deleteEvent($eventId);
         $eventId = $agenda->addEvent($startDate, $endDate, $allDay, $values['title'], $values['content'], $values['users_to_send'], false, null, $attachmentList, $attachmentCommentList, $comment);
         Display::return_message(get_lang('Updated'), 'confirmation');
         header("Location: {$agendaUrl}");
         exit;
     }
     $usersToSend = isset($values['users_to_send']) ? $values['users_to_send'] : '';
     // Editing normal event.
     $agenda->editEvent($eventId, $startDate, $endDate, $allDay, $values['title'], $values['content'], $usersToSend, $attachmentList, $attachmentCommentList, $comment, '', $sendEmail);
     if (!empty($values['repeat']) && !empty($eventId)) {
         // End date is always set as 23:59:59
         $endDate = substr($values['repeat_end_day'], 0, 10) . ' 23:59:59';
         $agenda->addRepeatedItem($eventId, $values['repeat_type'], $endDate, $values['users_to_send']);
     }
     $deleteAttachmentList = isset($values['delete_attachment']) ? $values['delete_attachment'] : array();
     if (!empty($deleteAttachmentList)) {
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:31,代码来源:agenda.php


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