+--------------------------------------------------------------------+
| CiviCRM version 5 |
+--------------------------------------------------------------------+
- | Copyright CiviCRM LLC (c) 2004-2019 |
+ | Copyright CiviCRM LLC (c) 2004-2020 |
+--------------------------------------------------------------------+
| This file is a part of CiviCRM. |
| |
/**
*
* @package CRM
- * @copyright CiviCRM LLC (c) 2004-2019
+ * @copyright CiviCRM LLC (c) 2004-2020
* $Id$
*
*/
$key = "{$id}_{$all}_{$condition}";
if (!isset(self::$event[$key])) {
- self::$event[$key] = array();
+ self::$event[$key] = [];
}
if (!self::$event[$key]) {
*/
public static function &participantStatus($id = NULL, $cond = NULL, $retColumn = 'name') {
if (self::$participantStatus === NULL) {
- self::$participantStatus = array();
+ self::$participantStatus = [];
}
$index = $cond ? $cond : 'No Condition';
$index = "{$index}_{$retColumn}";
if (!CRM_Utils_Array::value($index, self::$participantStatus)) {
- self::$participantStatus[$index] = array();
+ self::$participantStatus[$index] = [];
CRM_Core_PseudoConstant::populate(self::$participantStatus[$index],
'CRM_Event_DAO_ParticipantStatusType',
FALSE, $retColumn, 'is_active', $cond, 'weight'
* @return array
*/
public static function participantStatusClassOptions() {
- return array(
+ return [
'Positive' => ts('Positive'),
'Pending' => ts('Pending'),
'Waiting' => ts('Waiting'),
'Negative' => ts('Negative'),
- );
+ ];
}
/**
* @param int $id
* @param null $cond
*
- * @return array
+ * @return array|string
* array reference of all participant roles if any
*/
public static function &participantRole($id = NULL, $cond = NULL) {
$index = $cond ? $cond : 'No Condition';
if (!CRM_Utils_Array::value($index, self::$participantRole)) {
- self::$participantRole[$index] = array();
+ self::$participantRole[$index] = [];
$condition = NULL;
*
* @param int $id
*
- * @return array
+ * @return array|string
* array reference of all participant listings if any
*/
public static function &participantListing($id = NULL) {
if (!self::$participantListing) {
- self::$participantListing = array();
+ self::$participantListing = [];
self::$participantListing = CRM_Core_OptionGroup::values('participant_listing');
}
*
*
* @param int $id
- * @return array
+ * @return array|string
* array reference of all event types.
*/
public static function &eventType($id = NULL) {
if (!self::$eventType) {
- self::$eventType = array();
+ self::$eventType = [];
self::$eventType = CRM_Core_OptionGroup::values('event_type');
}