*
*/
public static function buildOnBehalfForm(&$form, $contactType, $countryID, $stateID, $title) {
-
- $config = CRM_Core_Config::singleton();
-
$form->assign('contact_type', $contactType);
$form->assign('fieldSetTitle', $title);
$form->assign('contactEditMode', TRUE);
);
}
- $addressSequence = $config->addressSequence();
+ $addressSequence = CRM_Utils_Address::sequence(\Civi::settings()->get('address_format'));
$form->assign('addressSequence', array_fill_keys($addressSequence, 1));
//Primary Phone
* Array of address sequence.
*/
public static function addressSequence() {
- $config = CRM_Core_Config::singleton();
- $addressSequence = $config->addressSequence();
+ $addressSequence = CRM_Utils_Address::sequence(\Civi::settings()->get('address_format'));
$countryState = $cityPostal = FALSE;
foreach ($addressSequence as $key => $field) {
* @deprecated
*/
public function addressSequence() {
+ CRM_Core_Error::deprecatedFunctionWarning('CRM_Utils_Address::sequence(Civi::settings()->get(\'address_format\')');
return CRM_Utils_Address::sequence(Civi::settings()->get('address_format'));
}
$entityBlock = ['contact_id' => $cid];
$location = CRM_Core_BAO_Location::getValues($entityBlock);
- $config = CRM_Core_Config::singleton();
- $addressSequence = array_flip($config->addressSequence());
+ $addressSequence = array_flip(CRM_Utils_Address::sequence(\Civi::settings()->get('address_format')));
$profileFields = CRM_Core_BAO_UFGroup::getFields($ufId, FALSE, CRM_Core_Action::VIEW, NULL, NULL, FALSE,
NULL, FALSE, NULL, CRM_Core_Permission::CREATE, NULL