Base functionality for all form view helpers

package Default
inherited_from \Zend\Form\View\Helper\FormMultiCheckbox

 Methods

Invoke helper as functor

__invoke(\Zend\Form\ElementInterface|null $element = null) : string | \Zend\Form\View\Helper\FormInput
Inherited

Proxies to \render().

Parameters

$element

\Zend\Form\ElementInterfacenull

Returns

string\Zend\Form\View\Helper\FormInput

Create a string of all attribute/value pairs

createAttributesString(array $attributes) : string
Inherited

Escapes all attribute values

Parameters

$attributes

array

Returns

string

Get value for doctype

getDoctype() : string
Inherited

Returns

string

Get character encoding

getEncoding() : string
Inherited

Returns

string

Get the ID of an element

getId(\Zend\Form\ElementInterface $element) : null | string
Inherited

If no ID attribute present, attempts to use the name attribute. If no name attribute is present, either, returns null.

Parameters

$element

\Zend\Form\ElementInterface

Returns

nullstring

Get the closing bracket for an inline tag

getInlineClosingBracket() : string
Inherited

Closes as either "/>" for XHTML doctypes or ">" otherwise.

Returns

string

Returns the attributes applied to each option label.

getLabelAttributes() : array | null
Inherited

Returns

arraynull

Get position of label

getLabelPosition() : string
Inherited

Returns

string

Get separator for checkbox elements

getSeparator() : string
Inherited

Returns

string

Returns translator used in helper

getTranslator() : \Zend\I18n\Translator\TranslatorInterface | null
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::getTranslator()

Returns

\Zend\I18n\Translator\TranslatorInterfacenull

Return the translation text domain

getTranslatorTextDomain() : string
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::getTranslatorTextDomain()

Returns

string

Returns the unchecked value used when "UseHiddenElement" is turned on.

getUncheckedValue() : string
Inherited

Returns

string

Returns the option for prefixing the element with a hidden element for the unset value.

getUseHiddenElement() : boolean
Inherited

Returns

boolean

Get the view object

getView() : null | \Zend\View\Renderer\RendererInterface
Inherited
inherited_from \Zend\View\Helper\HelperInterface::getView()

Returns

null\Zend\View\Renderer\RendererInterface

Checks if the helper has a translator

hasTranslator() : boolean
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::hasTranslator()

Returns

boolean

Returns whether translator is enabled and should be used

isTranslatorEnabled() : boolean
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::isTranslatorEnabled()

Returns

boolean

Render a form <input> element from the provided $element

render(\Zend\Form\ElementInterface $element) : string
Inherited

Parameters

$element

\Zend\Form\ElementInterface

Exceptions

\Zend\Form\Exception\DomainException

Returns

string

Set value for doctype

setDoctype(string $doctype) : \Zend\Form\View\Helper\AbstractHelper
Inherited

Parameters

$doctype

string

Returns

\Zend\Form\View\Helper\AbstractHelper

Set value for character encoding

setEncoding(string $encoding) : \Zend\Form\View\Helper\AbstractHelper
Inherited

Parameters

$encoding

string

Returns

\Zend\Form\View\Helper\AbstractHelper

Sets the attributes applied to option label.

setLabelAttributes(array|null $attributes) : \Zend\Form\View\Helper\FormMultiCheckbox
Inherited

Parameters

$attributes

arraynull

Returns

\Zend\Form\View\Helper\FormMultiCheckbox

Set value for labelPosition

setLabelPosition(mixed $labelPosition) : \Zend\Form\View\Helper\FormMultiCheckbox
Inherited

Parameters

$labelPosition

mixed

Exceptions

\Zend\Form\Exception\InvalidArgumentException

Returns

\Zend\Form\View\Helper\FormMultiCheckbox

Set separator string for checkbox elements

setSeparator(string $separator) : \Zend\Form\View\Helper\FormMultiCheckbox
Inherited

Parameters

$separator

string

Returns

\Zend\Form\View\Helper\FormMultiCheckbox

Sets translator to use in helper

setTranslator(\Zend\I18n\Translator\TranslatorInterface $translator = null, string $textDomain = null) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslator()

Parameters

$translator

\Zend\I18n\Translator\TranslatorInterface

[optional] translator. Default is null, which sets no translator.

$textDomain

string

[optional] text domain Default is null, which skips setTranslatorTextDomain

Returns

\Zend\I18n\View\Helper\AbstractTranslatorHelper

Sets whether translator is enabled and should be used

setTranslatorEnabled(boolean $enabled = true) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslatorEnabled()

Parameters

$enabled

boolean

Returns

\Zend\I18n\View\Helper\AbstractTranslatorHelper

Set translation text domain

setTranslatorTextDomain(string $textDomain = 'default') : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited
inherited_from \Zend\I18n\Translator\TranslatorAwareInterface::setTranslatorTextDomain()

Parameters

$textDomain

string

Returns

\Zend\I18n\View\Helper\AbstractTranslatorHelper

Sets the unchecked value used when "UseHiddenElement" is turned on.

setUncheckedValue(boolean $value) : \Zend\Form\View\Helper\FormMultiCheckbox
Inherited

Parameters

$value

boolean

Returns

\Zend\Form\View\Helper\FormMultiCheckbox

Sets the option for prefixing the element with a hidden element for the unset value.

setUseHiddenElement(boolean $useHiddenElement) : \Zend\Form\View\Helper\FormMultiCheckbox
Inherited

Parameters

$useHiddenElement

boolean

Returns

\Zend\Form\View\Helper\FormMultiCheckbox

Set the View object

setView(\Zend\View\Renderer\RendererInterface $view) : \Zend\View\Helper\AbstractHelper
Inherited
inherited_from \Zend\View\Helper\HelperInterface::setView()

Parameters

$view

\Zend\View\Renderer\RendererInterface

Returns

\Zend\View\Helper\AbstractHelper

Retrieve the doctype helper

getDoctypeHelper() : \Zend\View\Helper\Doctype
Inherited

Returns

\Zend\View\Helper\Doctype

Retrieve the escapeHtmlAttr helper

getEscapeHtmlAttrHelper() : \Zend\View\Helper\EscapeHtmlAttr
Inherited

Returns

\Zend\View\Helper\EscapeHtmlAttr

Retrieve the escapeHtml helper

getEscapeHtmlHelper() : \Zend\View\Helper\EscapeHtml
Inherited

Returns

\Zend\View\Helper\EscapeHtml

Retrieve the FormInput helper

getInputHelper() : \Zend\Form\View\Helper\FormInput
Inherited

Returns

\Zend\Form\View\Helper\FormInput

Return input type

getInputType() : string
inherited_from \Zend\Form\View\Helper\FormMultiCheckbox::getInputType()

Returns

string

Return input type

getInputType() : string
Inherited

Returns

string

Retrieve the FormLabel helper

getLabelHelper() : \Zend\Form\View\Helper\FormLabel
Inherited

Returns

\Zend\Form\View\Helper\FormLabel

Get element name

getName(\Zend\Form\ElementInterface $element) : string
Static
inherited_from \Zend\Form\View\Helper\FormMultiCheckbox::getName()

Parameters

$element

\Zend\Form\ElementInterface

Returns

string

Get element name

getName(\Zend\Form\ElementInterface $element) : string
InheritedStatic

Parameters

$element

\Zend\Form\ElementInterface

Exceptions

\Zend\Form\Exception\DomainException

Returns

string

Determine input type to use

getType(\Zend\Form\ElementInterface $element) : string
Inherited

Parameters

$element

\Zend\Form\ElementInterface

Returns

string

Prepare attributes for rendering

prepareAttributes(array $attributes) : array
Inherited

Ensures appropriate attributes are present (e.g., if "name" is present, but no "id", sets the latter to the former).

Removes any invalid attributes

Parameters

$attributes

array

Returns

array

Prepare a boolean attribute value

prepareBooleanAttributeValue(string $attribute, mixed $value) : string
Inherited

Prepares the expected representation for the boolean attribute specified.

Parameters

$attribute

string

$value

mixed

Returns

string

Render a hidden element for empty/unchecked value

renderHiddenElement(\Zend\Form\Element\MultiCheckbox $element, array $attributes) : string
Inherited

Parameters

$element

\Zend\Form\Element\MultiCheckbox

$attributes

array

Returns

string

Render options

renderOptions(\Zend\Form\Element\MultiCheckbox $element, array $options, array $selectedOptions, array $attributes) : string
Inherited

Parameters

$element

\Zend\Form\Element\MultiCheckbox

$options

array

$selectedOptions

array

$attributes

array

Returns

string

 Properties

 

Standard boolean attributes, with expected values for enabling/disabling

$booleanAttributes : array

Default

array('autofocus' => array('on' => 'autofocus', 'off' => ''), 'checked' => array('on' => 'checked', 'off' => ''), 'disabled' => array('on' => 'disabled', 'off' => ''), 'multiple' => array('on' => 'multiple', 'off' => ''), 'readonly' => array('on' => 'readonly', 'off' => ''), 'required' => array('on' => 'required', 'off' => ''), 'selected' => array('on' => 'selected', 'off' => ''))
 

$doctypeHelper

$doctypeHelper : \Zend\View\Helper\Doctype

Default

 

$escapeHtmlAttrHelper

$escapeHtmlAttrHelper : \Zend\View\Helper\EscapeHtmlAttr

Default

 

$escapeHtmlHelper

$escapeHtmlHelper : \Zend\View\Helper\EscapeHtml

Default

 

Form input helper instance

$inputHelper : \Zend\Form\View\Helper\FormInput

Default

 

The attributes applied to option label

$labelAttributes : array

Default

 

Form label helper instance

$labelHelper : \Zend\Form\View\Helper\FormLabel

Default

 

Where will be label rendered?

$labelPosition : string

Default

self::LABEL_APPEND
 

Separator for checkbox elements

$separator : string

Default

''
 

Translatable attributes

$translatableAttributes : array

Default

array('placeholder' => true, 'title' => true)
 

Translator (optional)

$translator : \Zend\I18n\Translator\TranslatorInterface

Default

 

Whether translator should be used

$translatorEnabled : boolean

Default

true
 

Translator text domain (optional)

$translatorTextDomain : string

Default

'default'
 

The unchecked value used when "UseHiddenElement" is turned on

$uncheckedValue : string

Default

''
 

Prefixing the element with a hidden element for the unset value?

$useHiddenElement : boolean

Default

false
 

Attributes globally valid for all tags

$validGlobalAttributes : array

Default

array('accesskey' => true, 'class' => true, 'contenteditable' => true, 'contextmenu' => true, 'dir' => true, 'draggable' => true, 'dropzone' => true, 'hidden' => true, 'id' => true, 'lang' => true, 'onabort' => true, 'onblur' => true, 'oncanplay' => true, 'oncanplaythrough' => true, 'onchange' => true, 'onclick' => true, 'oncontextmenu' => true, 'ondblclick' => true, 'ondrag' => true, 'ondragend' => true, 'ondragenter' => true, 'ondragleave' => true, 'ondragover' => true, 'ondragstart' => true, 'ondrop' => true, 'ondurationchange' => true, 'onemptied' => true, 'onended' => true, 'onerror' => true, 'onfocus' => true, 'oninput' => true, 'oninvalid' => true, 'onkeydown' => true, 'onkeypress' => true, 'onkeyup' => true, 'onload' => true, 'onloadeddata' => true, 'onloadedmetadata' => true, 'onloadstart' => true, 'onmousedown' => true, 'onmousemove' => true, 'onmouseout' => true, 'onmouseover' => true, 'onmouseup' => true, 'onmousewheel' => true, 'onpause' => true, 'onplay' => true, 'onplaying' => true, 'onprogress' => true, 'onratechange' => true, 'onreadystatechange' => true, 'onreset' => true, 'onscroll' => true, 'onseeked' => true, 'onseeking' => true, 'onselect' => true, 'onshow' => true, 'onstalled' => true, 'onsubmit' => true, 'onsuspend' => true, 'ontimeupdate' => true, 'onvolumechange' => true, 'onwaiting' => true, 'role' => true, 'aria-labelledby' => true, 'aria-describedby' => true, 'spellcheck' => true, 'style' => true, 'tabindex' => true, 'title' => true, 'xml:base' => true, 'xml:lang' => true, 'xml:space' => true)
 

Attributes valid for the tag represented by this helper

$validTagAttributes : array

Default

array()

This should be overridden in extending classes

 

Valid values for the input type

$validTypes : array

Default

array('text' => true, 'button' => true, 'checkbox' => true, 'file' => true, 'hidden' => true, 'image' => true, 'password' => true, 'radio' => true, 'reset' => true, 'select' => true, 'submit' => true, 'color' => true, 'date' => true, 'datetime' => true, 'datetime-local' => true, 'email' => true, 'month' => true, 'number' => true, 'range' => true, 'search' => true, 'tel' => true, 'time' => true, 'url' => true, 'week' => true)
 

View object instance

$view : \Zend\View\Renderer\RendererInterface

Default

null

 Constants

 

LABEL_APPEND

LABEL_APPEND = 'append' 
 

LABEL_PREPEND

LABEL_PREPEND = 'prepend'