* @param CRM_Core_Form $form
*/
protected static function setBasicSearchFields($form) {
- $userFramework = CRM_Core_Config::singleton()->userFramework;
+ $form->assign('basicSearchFields', self::getBasicSearchFields());
+ }
- $form->assign('basicSearchFields', [
+ /**
+ * Return list of basic contact fields that can be displayed for the basic search section.
+ *
+ */
+ public static function getBasicSearchFields() {
+ $userFramework = CRM_Core_Config::singleton()->userFramework;
+ return [
'sort_name' => ['name' => 'sort_name'],
'email' => ['name' => 'email'],
'contact_type' => ['name' => 'contact_type'],
'name' => 'uf_user',
'description' => ts('Does the contact have a %1 Account?', [$userFramework]),
],
- ]);
+ ];
}
/**