當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。