*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Event_BAO_Event extends CRM_Event_DAO_Event {
}
/**
- * Delete the location block associated with an event,
- * if not being used by any other event.
+ * Delete the location block associated with an event.
+ *
+ * Function checks that it is not being used by any other event.
*
- * @param $locBlockId
+ * @param int $locBlockId
* Location block id to be deleted.
* @param int $eventId
* Event with which loc block is associated.
}
/**
- * Get current/future Events
+ * Get current/future Events.
*
* @param int $all
* 0 returns current and future events.
/**
* Get events Summary.
*
- *
* @return array
* Array of event summary values
*/
}
$eventSummary['events'][$dao->id][$property] = $set;
- if (in_array($dao->id, $permissions[CRM_Core_Permission::EDIT])) {
+ if (is_array($permissions[CRM_Core_Permission::EDIT])
+ && in_array($dao->id, $permissions[CRM_Core_Permission::EDIT])) {
$eventSummary['events'][$dao->id]['configure'] = CRM_Utils_System::url('civicrm/admin/event', "action=update&id=$dao->id&reset=1");
}
break;
}
/**
- * make a copy of a Event, including
- * all the fields in the event Wizard
+ * Make a copy of a Event.
+ *
+ * Include all the fields in the event Wizard.
*
* @param int $id
* The event id to copy.
}
/**
- * This is sometimes called in a loop (during event search)
- * hence we cache the values to prevent repeated calls to the db
+ * This is sometimes called in a loop (during event search).
+ *
+ * We cache the values to prevent repeated calls to the db.
+ *
+ * @param int $id
+ *
+ * @return
*/
public static function isMonetary($id) {
static $isMonetary = array();
}
/**
- * This is sometimes called in a loop (during event search)
- * hence we cache the values to prevent repeated calls to the db
+ * This is sometimes called in a loop (during event search).
+ *
+ * We cache the values to prevent repeated calls to the db.
+ *
+ * @param int $id
+ *
+ * @return bool
*/
public static function usesPriceSet($id) {
static $usesPriceSet = array();
}
/**
- * Process that send e-mails
+ * Send e-mails.
*
* @param int $contactID
- * @param $values
+ * @param array $values
* @param int $participantId
* @param bool $isTest
* @param bool $returnMessageText
- *
- * @return void
*/
public static function sendMail($contactID, &$values, $participantId, $isTest = FALSE, $returnMessageText = FALSE) {
'email' => $email,
'confirm_email_text' => CRM_Utils_Array::value('confirm_email_text', $values['event']),
'isShowLocation' => CRM_Utils_Array::value('is_show_location', $values['event']),
+ // The concept of contributeMode is deprecated.
'contributeMode' => CRM_Utils_Array::value('contributeMode', $template->_tpl_vars),
'participantID' => $participantId,
'conference_sessions' => $sessions,
// address required during receipt processing (pdf and email receipt)
if ($displayAddress = CRM_Utils_Array::value('address', $values)) {
$sendTemplateParams['tplParams']['address'] = $displayAddress;
+ // The concept of contributeMode is deprecated.
$sendTemplateParams['tplParams']['contributeMode'] = NULL;
}
// set lineItem details
if ($lineItem = CRM_Utils_Array::value('lineItem', $values)) {
- // check if additional prticipant, if so filter only to relevant ones
+ // check if additional participant, if so filter only to relevant ones
// CRM-9902
if (!empty($values['params']['additionalParticipant'])) {
$ownLineItems = array();
* @param $isTest
* @param bool $isCustomProfile
* @param array $participantParams
- *
- * @return void
*/
public static function buildCustomDisplay(
$id,
* Formatted array of key value.
*
* @param array $profileFields
- *
- * @return void
*/
public static function displayProfile(&$params, $gid, &$groupTitle, &$values, &$profileFields = array()) {
if ($gid) {