/**
* Participant Listing
- *
* @var array
+ * @deprecated
*/
private static $participantListing;
/**
* Personal campaign pages
* @var array
+ * @deprecated
*/
private static $pcPage;
$index = $cond ? $cond : 'No Condition';
$index = "{$index}_{$retColumn}";
- if (!CRM_Utils_Array::value($index, self::$participantStatus)) {
+ if (empty(self::$participantStatus[$index])) {
self::$participantStatus[$index] = [];
CRM_Core_PseudoConstant::populate(self::$participantStatus[$index],
'CRM_Event_DAO_ParticipantStatusType',
*/
public static function &participantRole($id = NULL, $cond = NULL) {
$index = $cond ? $cond : 'No Condition';
- if (!CRM_Utils_Array::value($index, self::$participantRole)) {
+ if (empty(self::$participantRole[$index])) {
self::$participantRole[$index] = [];
$condition = NULL;
/**
* Get all the participant listings.
*
- *
+ * @deprecated
* @param int $id
- *
* @return array|string
* array reference of all participant listings if any
*/
public static function &participantListing($id = NULL) {
+ CRM_Core_Error::deprecatedFunctionWarning('Function participantListing will be removed');
if (!self::$participantListing) {
self::$participantListing = [];
self::$participantListing = CRM_Core_OptionGroup::values('participant_listing');
/**
* Get all the Personal campaign pages.
*
- *
+ * @deprecated
* @param int $id
* @return array
* array reference of all pcp if any
*/
public static function &pcPage($id = NULL) {
+ CRM_Core_Error::deprecatedFunctionWarning('Function pcPage will be removed');
if (!self::$pcPage) {
CRM_Core_PseudoConstant::populate(self::$pcPage,
'CRM_PCP_DAO_PCP',
);
}
if ($id) {
- return CRM_Utils_Array::value($id, self::$pcPage);
+ return self::$pcPage[$id] ?? NULL;
}
return self::$pcPage;
}