Skip to content

Commit

Permalink
Deprecated unused pseudoconstant functions
Browse files Browse the repository at this point in the history
  • Loading branch information
colemanw committed Mar 18, 2020
1 parent 6048b5a commit a59d834
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 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
4 changes: 3 additions & 1 deletion CRM/Contribute/PseudoConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {

/**
* Status of personal campaign page
* @deprecated
* @var array
*/
private static $pcpStatus;
Expand Down Expand Up @@ -342,12 +343,13 @@ public static function &pcPage($pageType = NULL, $id = NULL) {
*
* The static array pcpStatus is returned
*
*
* @deprecated
* @param string $column
* @return array
* array reference of all PCP activity statuses
*/
public static function &pcpStatus($column = 'label') {
CRM_Core_Error::deprecatedFunctionWarning('Function pcpStatus will be removed');
if (NULL === self::$pcpStatus) {
self::$pcpStatus = [];
}
Expand Down
10 changes: 6 additions & 4 deletions CRM/Event/PseudoConstant.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {

/**
* Participant Listing
*
* @deprecated
* @var array
*/
private static $participantListing;
Expand All @@ -66,6 +66,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {

/**
* Personal campaign pages
* @deprecated
* @var array
*/
private static $pcPage;
Expand Down Expand Up @@ -205,13 +206,13 @@ public static function &participantRole($id = NULL, $cond = 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');
Expand Down Expand Up @@ -285,12 +286,13 @@ public static function flush($name = 'cache') {
/**
* 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',
Expand Down

0 comments on commit a59d834

Please sign in to comment.