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


PHP CRM_Event_BAO_Event::del方法代码示例

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


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

示例1: postProcess

 /**
  * Process the form when submitted.
  */
 public function postProcess()
 {
     $participant = new CRM_Event_DAO_Participant();
     $participant->event_id = $this->_id;
     if ($participant->find()) {
         $searchURL = CRM_Utils_System::url('civicrm/event/search', 'reset=1');
         CRM_Core_Session::setStatus(ts('This event cannot be deleted because there are participant records linked to it. If you want to delete this event, you must first find the participants linked to this event and delete them. You can use use <a href=\'%1\'> CiviEvent >> Find Participants page </a>.', array(1 => $searchURL)), ts('Deletion Error'), 'error');
         return;
     }
     CRM_Event_BAO_Event::del($this->_id);
     if ($this->_isTemplate) {
         CRM_Core_Session::setStatus(ts("'%1' has been deleted.", array(1 => $this->_title)), ts('Template Deleted'), 'success');
         CRM_Utils_System::redirect(CRM_Utils_System::url('civicrm/admin/eventTemplate', 'reset=1'));
     } else {
         CRM_Core_Session::setStatus(ts("'%1' has been deleted.", array(1 => $this->_title)), ts('Event Deleted'), 'success');
     }
 }
开发者ID:kcristiano,项目名称:civicrm-core,代码行数:20,代码来源:Delete.php

示例2: _crm_error

/**
 * Deletes an existing event
 * 
 * This API is used for deleting a event
 * 
 * @param  Int  $eventID    ID of event to be deleted
 * 
 * @return null if successfull, object of CRM_Core_Error otherwise
 * @access public
 */
function &crm_delete_event($eventID)
{
    if (!$eventID) {
        return _crm_error('Invalid value for eventID');
    }
    require_once 'CRM/Event/BAO/Event.php';
    return CRM_Event_BAO_Event::del($eventID);
}
开发者ID:bhirsch,项目名称:voipdev,代码行数:18,代码来源:Event.php

示例3: delete

 /**
  * Helper function to delete an Event
  *
  * @param  int  $eventID   id of the event to delete
  * @return boolean true if event deleted, false otherwise
  *
  */
 static function delete($eventId)
 {
     return CRM_Event_BAO_Event::del($eventId);
 }
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:11,代码来源:Event.php

示例4: civicrm_api3_event_delete

/**
 * Deletes an existing event
 *
 * This API is used for deleting a event
 *
 * @param  Array  $params    array containing event_id to be deleted
 *
 * @return boolean        true if success, error otherwise
 * @access public
 *   note API has legacy support for 'event_id'
 *  {@getfields event_delete}
 */
function civicrm_api3_event_delete($params)
{
    return CRM_Event_BAO_Event::del($params['id']) ? civicrm_api3_create_success() : civicrm_api3_create_error(ts('Error while deleting event'));
}
开发者ID:archcidburnziso,项目名称:civicrm-core,代码行数:16,代码来源:Event.php

示例5: civicrm_event_delete

/**
 * Deletes an existing event
 * 
 * This API is used for deleting a event
 * 
 * @param  Array  $params    array containing event_id to be deleted
 * 
 * @return boolean        true if success, error otherwise
 * @access public
 */
function civicrm_event_delete(&$params)
{
    if (empty($params)) {
        return civicrm_create_error(ts('No input parameters present'));
    }
    $eventID = null;
    $eventID = CRM_Utils_Array::value('event_id', $params);
    if (!isset($eventID)) {
        return civicrm_create_error(ts('Invalid value for eventID'));
    }
    require_once 'CRM/Event/BAO/Event.php';
    return CRM_Event_BAO_Event::del($eventID) ? civicrm_create_success() : civicrm_create_error(ts('Error while deleting event'));
}
开发者ID:bhirsch,项目名称:voipdev,代码行数:23,代码来源:Event.php


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