Skip to content

Commit

Permalink
Refactor out unneeded pseudoconstant fn
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Mar 13, 2020
1 parent 33d8e2d commit bad4199
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
2 changes: 1 addition & 1 deletion CRM/Admin/Page/EventTemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ public function browse() {

$eventTypes = CRM_Event_PseudoConstant::eventType();
$participantRoles = CRM_Event_PseudoConstant::participantRole();
$participantListings = CRM_Event_PseudoConstant::participantListing();
$participantListings = CRM_Event_BAO_Event::buildOptions('participant_listing_id');

//find all event templates.
$eventTemplate->is_template = TRUE;
Expand Down
29 changes: 0 additions & 29 deletions CRM/Event/PseudoConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {
*/
private static $participantRole;

/**
* Participant Listing
*
* @var array
*/
private static $participantListing;

/**
* Event Type.
*
Expand Down Expand Up @@ -196,28 +189,6 @@ public static function &participantRole($id = NULL, $cond = NULL) {
return self::$participantRole[$index];
}

/**
* Get all the participant listings.
*
*
* @param int $id
*
* @return array|string
* array reference of all participant listings if any
*/
public static function &participantListing($id = NULL) {
if (!self::$participantListing) {
self::$participantListing = [];
self::$participantListing = CRM_Core_OptionGroup::values('participant_listing');
}

if ($id) {
return self::$participantListing[$id];
}

return self::$participantListing;
}

/**
* Get all event types.
*
Expand Down

0 comments on commit bad4199

Please sign in to comment.