package Default
inherited_from \Zend\View\Helper\AbstractHelper

 Methods

Invoke helper as function

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

Proxies to \render().

Parameters

$element

\Zend\Form\ElementInterfacenull

Returns

string\Zend\Form\View\Helper\FormElement

Add instance class to plugin map

addClass(string $class, string $plugin) : \Zend\Form\View\Helper\FormElement
fluent This method is part of a fluent interface and will return the same instance

Parameters

$class

string

$plugin

string

Returns

\Zend\Form\View\Helper\FormElement

Add form element type to plugin map

addType(string $type, string $plugin) : \Zend\Form\View\Helper\FormElement
fluent This method is part of a fluent interface and will return the same instance

Parameters

$type

string

$plugin

string

Returns

\Zend\Form\View\Helper\FormElement

Get the view object

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

Returns

null\Zend\View\Renderer\RendererInterface

Render an element

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

Introspects the element type and attributes to determine which helper to utilize when rendering.

Parameters

$element

\Zend\Form\ElementInterface

Returns

string

Set default helper name

setDefaultHelper(string $name) : \Zend\Form\View\Helper\FormElement
fluent This method is part of a fluent interface and will return the same instance

Parameters

$name

string

Returns

\Zend\Form\View\Helper\FormElement

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

Render element by helper name

renderHelper(string $name, \Zend\Form\ElementInterface $element) : string

Parameters

$name

string

$element

\Zend\Form\ElementInterface

Returns

string

Render element by instance map

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

Parameters

$element

\Zend\Form\ElementInterface

Returns

stringnull

Render element by type map

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

Parameters

$element

\Zend\Form\ElementInterface

Returns

stringnull

 Properties

 

Instance map to view helper

$classMap : array

Default

array('Zend\Form\Element\Button' => 'formbutton', 'Zend\Form\Element\Captcha' => 'formcaptcha', 'Zend\Form\Element\Csrf' => 'formhidden', 'Zend\Form\Element\Collection' => 'formcollection', 'Zend\Form\Element\DateTimeSelect' => 'formdatetimeselect', 'Zend\Form\Element\DateSelect' => 'formdateselect', 'Zend\Form\Element\MonthSelect' => 'formmonthselect')
 

Default helper name

$defaultHelper : string

Default

self::DEFAULT_HELPER
 

Type map to view helper

$typeMap : array

Default

array('checkbox' => 'formcheckbox', 'color' => 'formcolor', 'date' => 'formdate', 'datetime' => 'formdatetime', 'datetime-local' => 'formdatetimelocal', 'email' => 'formemail', 'file' => 'formfile', 'hidden' => 'formhidden', 'image' => 'formimage', 'month' => 'formmonth', 'multi_checkbox' => 'formmulticheckbox', 'number' => 'formnumber', 'password' => 'formpassword', 'radio' => 'formradio', 'range' => 'formrange', 'reset' => 'formreset', 'search' => 'formsearch', 'select' => 'formselect', 'submit' => 'formsubmit', 'tel' => 'formtel', 'text' => 'formtext', 'textarea' => 'formtextarea', 'time' => 'formtime', 'url' => 'formurl', 'week' => 'formweek')
 

View object instance

$view : \Zend\View\Renderer\RendererInterface

Default

null

 Constants

 

DEFAULT_HELPER

DEFAULT_HELPER = 'forminput'