Base functionality for all form view helpers

 Methods

Invoke helper as function

__invoke(\Zend\Form\ElementInterface $element, int $dateType, int | null | string $timeType, null | string $locale) : string

Proxies to render().

Parameters

$dateType

int

$timeType

intnullstring

$locale

nullstring

Returns

string

Create a string of all attribute/value pairs

createAttributesString(array $attributes) : string
Inherited

Escapes all attribute values

inherited_from \Zend\Form\View\Helper\AbstractHelper::createAttributesString()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::createAttributesString()
inherited_from \Zend\Form\View\Helper\FormDateSelect::createAttributesString()

Parameters

$attributes

array

Returns

string

getDateType()

getDateType() : int
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::getDateType()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getDateType()

Returns

int

Get value for doctype

getDoctype() : string
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::getDoctype()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getDoctype()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getDoctype()

Returns

string

Get character encoding

getEncoding() : string
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::getEncoding()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getEncoding()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getEncoding()

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.

inherited_from \Zend\Form\View\Helper\AbstractHelper::getId()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getId()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getId()

Parameters

Returns

nullstring

Get the closing bracket for an inline tag

getInlineClosingBracket() : string
Inherited

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::getInlineClosingBracket()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getInlineClosingBracket()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getInlineClosingBracket()

Returns

string

getLocale()

getLocale() : string
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::getLocale()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getLocale()

Returns

string

Override to also get time part

getPattern() : string

Returns

string

getTimeType()

getTimeType() : int

Returns

int

Returns translator used in helper

getTranslator() : \Zend\I18n\Translator\Translator | null
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::getTranslator()
inherited_from \Zend\Form\View\Helper\AbstractHelper::getTranslator()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getTranslator()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getTranslator()

Returns

Return the translation text domain

getTranslatorTextDomain() : string
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::getTranslatorTextDomain()
inherited_from \Zend\Form\View\Helper\AbstractHelper::getTranslatorTextDomain()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getTranslatorTextDomain()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getTranslatorTextDomain()

Returns

string

Get the view object

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

inherited_from \Zend\View\Helper\AbstractHelper::getView()
inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::getView()
inherited_from \Zend\Form\View\Helper\AbstractHelper::getView()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getView()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getView()

Returns

Checks if the helper has a translator

hasTranslator() : bool
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::hasTranslator()
inherited_from \Zend\Form\View\Helper\AbstractHelper::hasTranslator()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::hasTranslator()
inherited_from \Zend\Form\View\Helper\FormDateSelect::hasTranslator()

Returns

bool

Returns whether translator is enabled and should be used

isTranslatorEnabled() : bool
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::isTranslatorEnabled()
inherited_from \Zend\Form\View\Helper\AbstractHelper::isTranslatorEnabled()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::isTranslatorEnabled()
inherited_from \Zend\Form\View\Helper\FormDateSelect::isTranslatorEnabled()

Returns

bool

Render a date element that is composed of six selects

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

setDateType()

setDateType(int $dateType) : \Zend\Form\View\Helper\FormDateSelect
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::setDateType()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setDateType()

Parameters

$dateType

int

Returns

Set value for doctype

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::setDoctype()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::setDoctype()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setDoctype()

Parameters

$doctype

string

Returns

Set value for character encoding

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::setEncoding()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::setEncoding()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setEncoding()

Parameters

$encoding

string

Returns

setLocale()

setLocale(string $locale) : \Zend\Form\View\Helper\FormDateSelect
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::setLocale()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setLocale()

Parameters

$locale

string

Returns

setTimeType()

setTimeType(int $timeType) : \Zend\Form\View\Helper\FormDateTimeSelect

Parameters

$timeType

int

Returns

Sets translator to use in helper

setTranslator(\Zend\I18n\Translator\Translator $translator, string $textDomain) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::setTranslator()
inherited_from \Zend\Form\View\Helper\AbstractHelper::setTranslator()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::setTranslator()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setTranslator()

Parameters

$translator

\Zend\I18n\Translator\Translator

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

$textDomain

string

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

Returns

Sets whether translator is enabled and should be used

setTranslatorEnabled(bool $enabled) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::setTranslatorEnabled()
inherited_from \Zend\Form\View\Helper\AbstractHelper::setTranslatorEnabled()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::setTranslatorEnabled()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setTranslatorEnabled()

Parameters

$enabled

bool

[optional] whether translator should be used. Default is true.

Returns

Set translation text domain

setTranslatorTextDomain(string $textDomain) : \Zend\I18n\View\Helper\AbstractTranslatorHelper
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::setTranslatorTextDomain()
inherited_from \Zend\Form\View\Helper\AbstractHelper::setTranslatorTextDomain()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::setTranslatorTextDomain()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setTranslatorTextDomain()

Parameters

$textDomain

string

Returns

Set the View object

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

inherited_from \Zend\View\Helper\AbstractHelper::setView()
inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::setView()
inherited_from \Zend\Form\View\Helper\AbstractHelper::setView()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::setView()
inherited_from \Zend\Form\View\Helper\FormDateSelect::setView()

Parameters

Returns

Create a key => value options for days

getDaysOptions(string $pattern) : array
Inherited

inherited_from \Zend\Form\View\Helper\FormDateSelect::getDaysOptions()

Parameters

$pattern

string

Pattern to use for days

Returns

array

Retrieve the doctype helper

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::getDoctypeHelper()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getDoctypeHelper()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getDoctypeHelper()

Returns

Retrieve the escapeHtmlAttr helper

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::getEscapeHtmlAttrHelper()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getEscapeHtmlAttrHelper()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getEscapeHtmlAttrHelper()

Returns

Retrieve the escapeHtml helper

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::getEscapeHtmlHelper()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::getEscapeHtmlHelper()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getEscapeHtmlHelper()

Returns

Create a key => value options for hours

getHoursOptions(string $pattern) : array

Parameters

$pattern

string

Pattern to use for hours

Returns

array

Create a key => value options for minutes

getMinutesOptions(string $pattern) : array

Parameters

$pattern

string

Pattern to use for minutes

Returns

array

Create a key => value options for months

getMonthsOptions(string $pattern) : array
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::getMonthsOptions()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getMonthsOptions()

Parameters

$pattern

string

Pattern to use for months

Returns

array

Create a key => value options for seconds

getSecondsOptions(string $pattern) : array

Parameters

$pattern

string

Pattern to use for seconds

Returns

array

Retrieve the FormSelect helper

getSelectElementHelper() : \Zend\Form\View\Helper\FormRow
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::getSelectElementHelper()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getSelectElementHelper()

Returns

Create a key => value options for years NOTE: we don't use a pattern for years, as years written as two digits can lead to hard to read date for users, so we only use four digits years

getYearsOptions(int $minYear, int $maxYear) : array
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::getYearsOptions()
inherited_from \Zend\Form\View\Helper\FormDateSelect::getYearsOptions()

Parameters

$minYear

int

$maxYear

int

Returns

array

Parse the pattern

parsePattern(bool $renderDelimiters) : array

Parameters

$renderDelimiters

bool

Returns

array

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

inherited_from \Zend\Form\View\Helper\AbstractHelper::prepareAttributes()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::prepareAttributes()
inherited_from \Zend\Form\View\Helper\FormDateSelect::prepareAttributes()

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.

inherited_from \Zend\Form\View\Helper\AbstractHelper::prepareBooleanAttributeValue()
inherited_from \Zend\Form\View\Helper\FormMonthSelect::prepareBooleanAttributeValue()
inherited_from \Zend\Form\View\Helper\FormDateSelect::prepareBooleanAttributeValue()

Parameters

$attribute

string

$value

mixed

Returns

string

 Properties

 

Standard boolean attributes, with expected values for enabling/disabling

$booleanAttributes : array
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$booleanAttributes
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$booleanAttributes
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$booleanAttributes
 

Date formatter to use

$dateType : int
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$dateType
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$dateType
 

$doctypeHelper

$doctypeHelper : \Zend\View\Helper\Doctype
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$doctypeHelper
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$doctypeHelper
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$doctypeHelper
 

$escapeHtmlAttrHelper

$escapeHtmlAttrHelper : \Zend\View\Helper\EscapeHtmlAttr
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$escapeHtmlAttrHelper
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$escapeHtmlAttrHelper
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$escapeHtmlAttrHelper
 

$escapeHtmlHelper

$escapeHtmlHelper : \Zend\View\Helper\EscapeHtml
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$escapeHtmlHelper
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$escapeHtmlHelper
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$escapeHtmlHelper
 

Locale to use

$locale : string
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$locale
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$locale
 

Pattern to use for Date rendering

$pattern : string
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$pattern
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$pattern
 

FormSelect helper

$selectHelper : \Zend\Form\View\Helper\FormSelect
Inherited

inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$selectHelper
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$selectHelper
 

Time formatter to use

$timeType : int

 

Translatable attributes

$translatableAttributes : array
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$translatableAttributes
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$translatableAttributes
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$translatableAttributes
 

Translator (optional)

$translator : \Zend\I18n\Translator\Translator
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::$$translator
inherited_from \Zend\Form\View\Helper\AbstractHelper::$$translator
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$translator
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$translator
 

Whether translator should be used

$translatorEnabled : bool
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::$$translatorEnabled
inherited_from \Zend\Form\View\Helper\AbstractHelper::$$translatorEnabled
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$translatorEnabled
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$translatorEnabled
 

Translator text domain (optional)

$translatorTextDomain : string
Inherited

inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::$$translatorTextDomain
inherited_from \Zend\Form\View\Helper\AbstractHelper::$$translatorTextDomain
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$translatorTextDomain
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$translatorTextDomain
 

Attributes globally valid for all tags

$validGlobalAttributes : array
Inherited

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$validGlobalAttributes
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$validGlobalAttributes
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$validGlobalAttributes
 

Attributes valid for the tag represented by this helper

$validTagAttributes : array
Inherited

This should be overridden in extending classes

inherited_from \Zend\Form\View\Helper\AbstractHelper::$$validTagAttributes
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$validTagAttributes
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$validTagAttributes
 

View object

$view : \Zend\View\Renderer\RendererInterface
Inherited

inherited_from \Zend\View\Helper\AbstractHelper::$$view
inherited_from \Zend\I18n\View\Helper\AbstractTranslatorHelper::$$view
inherited_from \Zend\Form\View\Helper\AbstractHelper::$$view
inherited_from \Zend\Form\View\Helper\FormMonthSelect::$$view
inherited_from \Zend\Form\View\Helper\FormDateSelect::$$view