+--------------------------------------------------------------------+
| CiviCRM version 4.6 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2014 |
+ | Copyright CiviCRM LLC (c) 2004-2015 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
| GNU Affero General Public License or the licensing of CiviCRM, |
| see the CiviCRM license FAQ at http://civicrm.org/licensing |
+--------------------------------------------------------------------+
-*/
+ */
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2014
+ * @copyright CiviCRM LLC (c) 2004-2015
* $Id$
*
*/
class CRM_Event_BAO_Event extends CRM_Event_DAO_Event {
/**
- * Class constructor
+ * Class constructor.
*/
public function __construct() {
parent::__construct();
}
/**
- * Fetch object based on array of properties
+ * Fetch object based on array of properties.
*
* @param array $params
* (reference ) an assoc array of name/value pairs.
}
/**
- * Update the is_active flag in the db
+ * Update the is_active flag in the db.
*
* @param int $id
* Id of the database record.
}
/**
- * Add the event
+ * Add the event.
*
* @param array $params
* Reference array contains the values submitted by the form.
}
/**
- * Create the event
+ * Create the event.
*
* @param array $params
* Reference array contains the values submitted by the form.
}
/**
- * Delete the event
+ * Delete the event.
*
* @param int $id
* Event id.
*
* @return array
*/
- static function getEvents(
+ public static function getEvents(
$all = 0,
$id = FALSE,
$isActive = TRUE,
}
/**
- * Get events Summary
+ * Get events Summary.
*
*
* @return array
}
/**
- * Get participant count
+ * Get participant count.
*
* @param int $eventId
- * @param bool $considerStatusConsider status for participant count.
+ * @param bool $considerStatus consider status for participant count.
* Consider status for participant count.
- * @param bool $statusConsider counted participant.
+ * @param bool $status counted participant.
* Consider counted participant.
- * @param bool $considerRoleConsider role for participant count.
+ * @param bool $considerRole consider role for participant count.
* Consider role for participant count.
- * @param bool $roleConsider counted( is filter role) participant.
+ * @param bool $role consider counted( is filter role) participant.
* Consider counted( is filter role) participant.
*
*
}
/**
- * Get the information to map a event
+ * Get the information to map a event.
*
* @param int $id
* For which we want map info.
}
/**
- * Get the complete information for one or more events
+ * Get the complete information for one or more events.
*
* @param date $start
* Get events with start date >= this date.
- * @param int $typeGet events on the a specific event type (by event_type_id).
+ * @param int $type Get events on the a specific event type (by event_type_id).
* Get events on the a specific event type (by event_type_id).
- * @param int $eventIdReturn a single event - by event id.
+ * @param int $eventId Return a single event - by event id.
* Return a single event - by event id.
* @param date $end
* Also get events with end date >= this date.
- * @param bool $onlyPublicInclude public events only, default TRUE.
+ * @param bool $onlyPublic Include public events only, default TRUE.
* Include public events only, default TRUE.
*
* @return array
* array of all the events that are searched
*/
- static function &getCompleteInfo(
+ public static function &getCompleteInfo(
$start = NULL,
$type = NULL,
$eventId = NULL,
array('id' => $id),
array(
'loc_block_id' =>
- ($locBlockId) ? $locBlockId : NULL,
+ ($locBlockId) ? $locBlockId : NULL,
),
$fieldsFix
);
$tplParams['participant_status'] = CRM_Event_PseudoConstant::participantStatus($statusId, NULL, 'label');
}
//CRM-15754 - if participant_status contains status ID
- elseif (CRM_Utils_Rule::integer($tplParams['participant_status'])) {
+ elseif (!empty($tplParams['participant_status']) && CRM_Utils_Rule::integer($tplParams['participant_status'])) {
$tplParams['participant_status'] = CRM_Event_PseudoConstant::participantStatus($tplParams['participant_status'], NULL, 'label');
}
*
* @return void
*/
- static function buildCustomDisplay(
+ public static function buildCustomDisplay(
$id,
$name,
$cid,
}
/**
- * Build the array for display the profile fields
+ * Build the array for display the profile fields.
*
* @param array $params
* Key value.
* @return array
* array of Additional participant's info OR array of Ids.
*/
- static function buildCustomProfile(
+ public static function buildCustomProfile(
$participantId,
$values,
$contactId = NULL,
}
/**
- * Check if event registration is valid according to permissions AND Dates
+ * Check if event registration is valid according to permissions AND Dates.
*
* @param array $values
* @param int $eventID
- * @return boolean
+ * @return bool
*/
public static function validRegistrationRequest($values, $eventID) {
// check that the user has permission to register for this event
}
/**
- * Make sure that the user has permission to access this event
+ * Make sure that the user has permission to access this event.
*
* @param int $eventId
* @param int $type
}
/**
- * Retrieve event template default values to be set
+ * Retrieve event template default values to be set.
* as default values for current new event.
*
* @param int $templateId
}
/**
- * Update the Campaign Id of all the participants of the given event
+ * Update the Campaign Id of all the participants of the given event.
*
* @param int $eventID
* Event id.
// Fixme - this is going to ignore context, better to get conditions, add params, and call PseudoConstant::get
return CRM_Financial_BAO_FinancialType::getIncomeFinancialType();
- break;
+ break;
}
return CRM_Core_PseudoConstant::get(__CLASS__, $fieldName, $params, $context);
}