class CRM_Core_Form_Renderer extends HTML_QuickForm_Renderer_ArraySmarty

Customize QF output to meet our specific requirements

Properties

static array $_sizeMapper The converter from array size to css class.

Methods

__construct()

Constructor.

static 
singleton()

Static instance provider.

array
_elementToArray(HTML_QuickForm_element $element, bool $required, string $error)

Creates an array representing an element containing.

static 
updateAttributes(HTML_QuickForm_element $element, bool $required, string $error)

Update the attributes of this element and add a few CiviCRM based attributes so we can style this form element better

static 
preProcessEntityRef(HTML_QuickForm_element $field)

Convert IDs to values and format for display.

renderFrozenDatepicker(array $el, HTML_QuickForm_element $field)

Render datepicker as text.

renderFrozenSelect2(array $el, HTML_QuickForm_element $field)

Render select2 as text.

renderFrozenEntityRef(array $el, HTML_QuickForm_element $field)

Render entity references as text.

static 
preprocessContactReference(HTML_QuickForm_element $field)

Pre-fill contact name for a custom field of type ContactReference

addOptionsEditLink(array $el, HTML_QuickForm_element $field)

No description

appendUnselectButton(array $el, HTML_QuickForm_element $field)

No description

Details

at line 70
__construct()

Constructor.

at line 80
static singleton()

Static instance provider.

Method providing static instance of as in Singleton pattern.

at line 102
array _elementToArray(HTML_QuickForm_element $element, bool $required, string $error)

Creates an array representing an element containing.

the key for storing this. We allow the parent to do most of the work, but then we add some CiviCRM specific enhancements to make the html compliant with our css etc

Parameters

HTML_QuickForm_element $element
bool $required Whether an element is required.
string $error Error associated with the element.

Return Value

array

at line 171
static updateAttributes(HTML_QuickForm_element $element, bool $required, string $error)

Update the attributes of this element and add a few CiviCRM based attributes so we can style this form element better

Parameters

HTML_QuickForm_element $element
bool $required Whether an element is required.
string $error Error associated with the element.

at line 238
static preProcessEntityRef(HTML_QuickForm_element $field)

Convert IDs to values and format for display.

Parameters

HTML_QuickForm_element $field

at line 279
renderFrozenDatepicker(array $el, HTML_QuickForm_element $field)

Render datepicker as text.

Parameters

array $el
HTML_QuickForm_element $field

at line 302
renderFrozenSelect2(array $el, HTML_QuickForm_element $field)

Render select2 as text.

Parameters

array $el
HTML_QuickForm_element $field

at line 324
renderFrozenEntityRef(array $el, HTML_QuickForm_element $field)

Render entity references as text.

If user has permission, format as link (for now limited to contacts).

Parameters

array $el
HTML_QuickForm_element $field

at line 353
static preprocessContactReference(HTML_QuickForm_element $field)

Pre-fill contact name for a custom field of type ContactReference

Todo: Migrate contact reference fields to use EntityRef

Parameters

HTML_QuickForm_element $field

Parameters

array $el
HTML_QuickForm_element $field

at line 399
appendUnselectButton(array $el, HTML_QuickForm_element $field)

Parameters

array $el
HTML_QuickForm_element $field