AbstractHelper

Base functionality for all form view helpers
extends Zend\I18n\View\Helper\AbstractTranslatorHelper

Known subclasses

Omeka\Form\View\Helper\FormAsset, Omeka\Form\View\Helper\FormCkeditor, Omeka\Form\View\Helper\FormCkeditorInline, Omeka\Form\View\Helper\FormColorPicker, Omeka\Form\View\Helper\FormRecaptcha, Omeka\Form\View\Helper\FormRestoreTextarea, Zend\Form\View\Helper\FormInput, Zend\Form\View\Helper\FormText, Zend\Form\View\Helper\FormTextarea
Abstract
Open source code
Methods Summary
public
# setDoctype( string $doctype )
Set value for doctype
public
# getDoctype( )
Get value for doctype
public
# setEncoding( string $encoding )
Set value for character encoding
public
# getEncoding( )
Get character encoding
public
# createAttributesString( array $attributes )
Create a string of all attribute/value pairs Escapes all attribute values
public
# getId( Zend\Form\ElementInterface $element )
Get the ID of an element If no ID attribute present, attempts to use the name attribute. If no name attribute is present, either, returns null.
public
# getInlineClosingBracket( )
Get the closing bracket for an inline tag Closes as either "/>" for XHTML doctypes or ">" otherwise.
protected
# getDoctypeHelper( )
Retrieve the doctype helper
protected
# getEscapeHtmlHelper( )
Retrieve the escapeHtml helper
protected
# getEscapeHtmlAttrHelper( )
Retrieve the escapeHtmlAttr helper
protected
# prepareAttributes( array $attributes )
Prepare attributes for rendering Ensures appropriate attributes are present (e.g., if "name" is present, but no "id", sets the latter to the former). Removes any invalid attributes
protected
# prepareBooleanAttributeValue( string $attribute , mixed $value )
Prepare a boolean attribute value Prepares the expected representation for the boolean attribute specified.
protected
# translateHtmlAttributeValue( string $key , string $value )
Translates the value of the HTML attribute if it should be translated and this view helper has a translator
public
# addTranslatableAttribute( string $attribute )
Adds an HTML attribute to the list of translatable attributes
public static
# addDefaultTranslatableAttribute( string $attribute )
Adds an HTML attribute to the list of the default translatable attributes
public
# addTranslatableAttributePrefix( string $prefix )
Adds an HTML attribute to the list of translatable attributes
public static
# addDefaultTranslatableAttributePrefix( string $prefix )
Adds an HTML attribute to the list of translatable attributes
Methods inherited from Zend\I18n\View\Helper\AbstractTranslatorHelper
setTranslator(), getTranslator(), hasTranslator(), setTranslatorEnabled(), isTranslatorEnabled(), setTranslatorTextDomain(), getTranslatorTextDomain()
Methods inherited from Zend\View\Helper\AbstractHelper
setView(), getView()
Properties Summary
protected static array $defaultTranslatableHtmlAttributes
The default translatable HTML attributes
# array ( 'title' => true, )
protected static array $defaultTranslatableHtmlAttributePrefixes
The default translatable HTML attribute prefixes
# array ( )
protected array $booleanAttributes
Standard boolean attributes, with expected values for enabling/disabling
# 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' => '', ), )
protected array $translatableAttributes
Translatable attributes
# array ( 'placeholder' => true, )
protected array $translatableAttributePrefixes
Prefixes of translatable HTML attributes
# array ( )
protected Zend\View\Helper\Doctype $doctypeHelper
# NULL
protected Zend\View\Helper\EscapeHtml $escapeHtmlHelper
# NULL
protected Zend\View\Helper\EscapeHtmlAttr $escapeHtmlAttrHelper
# NULL
protected array $validGlobalAttributes
Attributes globally valid for all tags
# 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, 'spellcheck' => true, 'style' => true, 'tabindex' => true, 'title' => true, 'xml:base' => true, 'xml:lang' => true, 'xml:space' => true, )
protected array $validTagAttributes
Attributes valid for the tag represented by this helper This should be overridden in extending classes
# array ( )
Properties inherited from Zend\I18n\View\Helper\AbstractTranslatorHelper
$translator, $translatorTextDomain, $translatorEnabled
Properties inherited from Zend\View\Helper\AbstractHelper
$view