Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate unused/unneeded pseudoconstant functions #16771

Merged
merged 1 commit into from
Mar 18, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 @@ -69,6 +69,7 @@ class CRM_Contribute_PseudoConstant extends CRM_Core_PseudoConstant {
/**
* Status of personal campaign page
* @var array
* @deprecated
*/
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,8 +46,8 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {

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

Expand All @@ -67,6 +67,7 @@ class CRM_Event_PseudoConstant extends CRM_Core_PseudoConstant {
/**
* Personal campaign pages
* @var array
* @deprecated
*/
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