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

[NFC] Remove no-longer used (protected) function getAllContactReturnFields() #24313

Merged
merged 1 commit into from
Aug 22, 2022
Merged
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
65 changes: 0 additions & 65 deletions CRM/Contact/Tokens.php
Original file line number Diff line number Diff line change
Expand Up @@ -486,71 +486,6 @@ protected function getContact(int $contactId, array $requiredFields, bool $getAl
return $contact;
}

/**
* Get the array of the return fields from 'get all'.
*
* This is the list from the BAO_Query object but copied
* here to be 'frozen in time'. The goal is to map to apiv4
* and stop using the legacy call to load the contact.
*
* @return array
*/
protected function getAllContactReturnFields(): array {
return [
'image_URL' => 1,
'legal_identifier' => 1,
'external_identifier' => 1,
'contact_type' => 1,
'contact_sub_type' => 1,
'sort_name' => 1,
'display_name' => 1,
'preferred_mail_format' => 1,
'nick_name' => 1,
'first_name' => 1,
'middle_name' => 1,
'last_name' => 1,
'prefix_id' => 1,
'suffix_id' => 1,
'formal_title' => 1,
'communication_style_id' => 1,
'birth_date' => 1,
'gender_id' => 1,
'street_address' => 1,
'supplemental_address_1' => 1,
'supplemental_address_2' => 1,
'supplemental_address_3' => 1,
'city' => 1,
'postal_code' => 1,
'postal_code_suffix' => 1,
'state_province' => 1,
'country' => 1,
'world_region' => 1,
'geo_code_1' => 1,
'geo_code_2' => 1,
'email' => 1,
'on_hold' => 1,
'phone' => 1,
'im' => 1,
'household_name' => 1,
'organization_name' => 1,
'deceased_date' => 1,
'is_deceased' => 1,
'job_title' => 1,
'legal_name' => 1,
'sic_code' => 1,
'current_employer' => 1,
'do_not_email' => 1,
'do_not_mail' => 1,
'do_not_sms' => 1,
'do_not_phone' => 1,
'do_not_trade' => 1,
'is_opt_out' => 1,
'contact_is_deleted' => 1,
'preferred_communication_method' => 1,
'preferred_language' => 1,
];
}

/**
* These tokens still work but we don't advertise them.
*
Expand Down