Zend_Form_Decorator_FormErrors

Displays all form errors in one view.

Any options passed will be used as HTML attributes of the ul tag for the errors.

category Zend
package Zend_Form
subpackage Decorator
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
version $Id$
inherited_from \Zend_Form_Decorator_Abstract

 Methods

Constructor

__construct(array|\Zend_Config $options = null) : void
Inherited

Accept options during initialization.

inherited_from \Zend_Form_Decorator_Interface::__construct()

Parameters

$options

array\Zend_Config

Clear all options

clearOptions() : \Zend_Form_Decorator_Abstract
Inherited
inherited_from \Zend_Form_Decorator_Interface::clearOptions()

Returns

\Zend_Form_Decorator_Abstract

Retrieve current element

getElement() : \Zend_Form_Element | \Zend_Form
Inherited
inherited_from \Zend_Form_Decorator_Interface::getElement()

Returns

\Zend_Form_Element\Zend_Form

Get escape flag

getEscape() : boolean

Returns

boolean

Retrieve markupElementLabelEnd

getMarkupElementLabelEnd() : string

Returns

string

Retrieve markupElementLabelStart

getMarkupElementLabelStart() : string

Returns

string

Retrieve markupListEnd

getMarkupListEnd() : string

Returns

string

Retrieve markupListItemEnd

getMarkupListItemEnd() : string

Returns

string

Retrieve markupListItemStart

getMarkupListItemStart() : string

Returns

string

Retrieve markupListStart

getMarkupListStart() : string

Returns

string

Get onlyCustomFormErrors

getOnlyCustomFormErrors() : boolean

Returns

boolean

Get option

getOption(string $key) : mixed
Inherited
inherited_from \Zend_Form_Decorator_Interface::getOption()

Parameters

$key

string

Returns

mixed

Retrieve options

getOptions() : array
Inherited
inherited_from \Zend_Form_Decorator_Interface::getOptions()

Returns

array

Determine if decorator should append or prepend content

getPlacement() : string
Inherited

Returns

string

Retrieve separator to use between old and new content

getSeparator() : string
Inherited

Returns

string

Get showCustomFormErrors

getShowCustomFormErrors() : boolean

Returns

boolean

Retrieve ignoreSubForms

ignoreSubForms() : boolean

Returns

boolean

Initialize options

initOptions() : void

Remove single option

removeOption(mixed $key) : void
Inherited
inherited_from \Zend_Form_Decorator_Interface::removeOption()

Parameters

$key

mixed

Render errors

render(string $content) : string
inherited_from \Zend_Form_Decorator_Abstract::render()

Parameters

$content

string

Returns

string

Decorate content and/or element

render(string $content) : string
Inherited
inherited_from \Zend_Form_Decorator_Interface::render()

Parameters

$content

string

Exceptions

\Zend_Form_Decorator_Exception when unimplemented

Returns

string

Render element label

renderLabel(\Zend_Form_Element $element, \Zend_View_Interface $view) : string

Parameters

$element

\Zend_Form_Element

$view

\Zend_View_Interface

Returns

string

Set options from config object

setConfig(\Zend_Config $config) : \Zend_Form_Decorator_Abstract
Inherited
inherited_from \Zend_Form_Decorator_Interface::setConfig()

Parameters

$config

\Zend_Config

Returns

\Zend_Form_Decorator_Abstract

Set current form element

setElement(\Zend_Form_Element|\Zend_Form $element) : \Zend_Form_Decorator_Abstract
Inherited

While the name is "setElement", a form decorator could decorate either an element or a form object.

inherited_from \Zend_Form_Decorator_Interface::setElement()

Parameters

$element

\Zend_Form_Element\Zend_Form

Exceptions

\Zend_Form_Decorator_Exception on invalid element type

Returns

\Zend_Form_Decorator_Abstract

Set whether or not to escape error label and error message

setEscape(boolean $flag) : \Zend_Form_Decorator_FormErrors

Sets also the 'escape' option for the view helper

Parameters

$flag

boolean

Returns

\Zend_Form_Decorator_FormErrors

Set ignoreSubForms

setIgnoreSubForms(boolean $ignoreSubForms) : \Zend_Form_Decorator_FormErrors

Parameters

$ignoreSubForms

boolean

Returns

\Zend_Form_Decorator_FormErrors

Set markupElementLabelEnd

setMarkupElementLabelEnd(string $markupElementLabelEnd) : \Zend_Form_Decorator_FormErrors

Parameters

$markupElementLabelEnd

string

Returns

\Zend_Form_Decorator_FormErrors

Set markupElementLabelStart

setMarkupElementLabelStart(string $markupElementLabelStart) : \Zend_Form_Decorator_FormErrors

Parameters

$markupElementLabelStart

string

Returns

\Zend_Form_Decorator_FormErrors

Set markupListEnd

setMarkupListEnd(string $markupListEnd) : \Zend_Form_Decorator_FormErrors

Parameters

$markupListEnd

string

Returns

\Zend_Form_Decorator_FormErrors

Set markupListItemEnd

setMarkupListItemEnd(string $markupListItemEnd) : \Zend_Form_Decorator_FormErrors

Parameters

$markupListItemEnd

string

Returns

\Zend_Form_Decorator_FormErrors

Set markupListItemStart

setMarkupListItemStart(string $markupListItemStart) : \Zend_Form_Decorator_FormErrors

Parameters

$markupListItemStart

string

Returns

\Zend_Form_Decorator_FormErrors

Set markupListStart

setMarkupListStart(string $markupListStart) : \Zend_Form_Decorator_FormErrors

Parameters

$markupListStart

string

Returns

\Zend_Form_Decorator_FormErrors

Set onlyCustomFormErrors, whether to display elements messages in addition to custom form messages.

setOnlyCustomFormErrors(boolean $onlyCustomFormErrors) : \Zend_Form_Decorator_FormErrors

Parameters

$onlyCustomFormErrors

boolean

Returns

\Zend_Form_Decorator_FormErrors

Set option

setOption(string $key, mixed $value) : \Zend_Form_Decorator_Abstract
Inherited
inherited_from \Zend_Form_Decorator_Interface::setOption()

Parameters

$key

string

$value

mixed

Returns

\Zend_Form_Decorator_Abstract

Set options

setOptions(array $options) : \Zend_Form_Decorator_Abstract
Inherited
inherited_from \Zend_Form_Decorator_Interface::setOptions()

Parameters

$options

array

Returns

\Zend_Form_Decorator_Abstract

Set showCustomFormErrors

setShowCustomFormErrors(boolean $showCustomFormErrors) : \Zend_Form_Decorator_FormErrors

Parameters

$showCustomFormErrors

boolean

Returns

\Zend_Form_Decorator_FormErrors

Recurse through a form object, rendering errors

_recurseForm(\Zend_Form $form, \Zend_View_Interface $view) : string

Parameters

$form

\Zend_Form

$view

\Zend_View_Interface

Returns

string

 Properties

 

Default values for markup options

$_defaults : array

Default

array('ignoreSubForms' => false, 'showCustomFormErrors' => true, 'onlyCustomFormErrors' => false, 'markupElementLabelEnd' => '', 'markupElementLabelStart' => '', 'markupListEnd' => '', 'markupListItemEnd' => '', 'markupListItemStart' => '
  • ', 'markupListStart' => '
      ')
  •  

    $_element

    $_element : \Zend_Form_Element | \Zend_Form

    Default

     

    Whether or not to escape error label and error message

    $_escape : boolean

    Default

     

    $_ignoreSubForms

    $_ignoreSubForms 

    Default

     

    $_markupElementLabelEnd

    $_markupElementLabelEnd 

    Default

     

    $_markupElementLabelStart

    $_markupElementLabelStart 

    Default

     

    $_markupListEnd

    $_markupListEnd 

    Default

     

    $_markupListItemEnd

    $_markupListItemEnd 

    Default

     

    $_markupListItemStart

    $_markupListItemStart 

    Default

     

    $_markupListStart

    $_markupListStart 

    Default

     

    $_onlyCustomFormErrors

    $_onlyCustomFormErrors 

    Default

     

    Decorator options

    $_options : array

    Default

    array()
     

    Default placement: append

    $_placement : string

    Default

    'APPEND'
     

    Separator between new content and old

    $_separator : string

    Default

    PHP_EOL
     

    $_showCustomFormErrors

    $_showCustomFormErrors 

    Default

     Constants

     

    Placement constants

    APPEND = 'APPEND' 
     

    PREPEND

    PREPEND = 'PREPEND'