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.

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 165
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 232
static preProcessEntityRef(HTML_QuickForm_element $field)

Convert IDs to values and format for display.

Parameters

HTML_QuickForm_element $field

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

Render select2 as text.

Parameters

array $el
HTML_QuickForm_element $field

at line 287
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 316
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 362
appendUnselectButton(array $el, HTML_QuickForm_element $field)

Parameters

array $el
HTML_QuickForm_element $field