CRM_Contact_Form_Edit_CommunicationPreferences
in package
Form helper class for an Communication Preferences object.
Table of Contents
Properties
- $greetings : array<string|int, mixed>
- Greetings.
Methods
- buildQuickForm() : mixed
- Build the form object elements for Communication Preferences object.
- formRule() : bool|array<string|int, mixed>
- Global form rule.
- getGreetingFields() : mixed
- Set array of greeting fields.
- setDefaultValues() : mixed
- Set default values for the form.
Properties
$greetings
Greetings.
public
static array<string|int, mixed>
$greetings
= []
Methods
buildQuickForm()
Build the form object elements for Communication Preferences object.
public
static buildQuickForm(CRM_Core_Form &$form) : mixed
Parameters
- $form : CRM_Core_Form
-
Reference to the form object.
formRule()
Global form rule.
public
static formRule(array<string|int, mixed> $fields, array<string|int, mixed> $files, CRM_Contact_Form_Edit_CommunicationPreferences $self) : bool|array<string|int, mixed>
Parameters
- $fields : array<string|int, mixed>
-
The input form values.
- $files : array<string|int, mixed>
-
The uploaded files if any.
- $self : CRM_Contact_Form_Edit_CommunicationPreferences
Return values
bool|array<string|int, mixed> —true if no errors, else array of errors
getGreetingFields()
Set array of greeting fields.
public
static getGreetingFields(string $contactType) : mixed
Parameters
- $contactType : string
setDefaultValues()
Set default values for the form.
public
static setDefaultValues(CRM_Core_Form &$form, array<string|int, mixed> &$defaults) : mixed
Parameters
- $form : CRM_Core_Form
- $defaults : array<string|int, mixed>