Form/DisplayGroup.php

Show: PublicProtectedPrivateinherited
Table of Contents
Zend Framework
LICENSE This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Package
Zend_Form  

\Zend_Form_DisplayGroup

Package: Zend_Form
Zend_Form_DisplayGroup
Implements
Children
\Zend_Dojo_Form_DisplayGroup
Category
Zend  
Copyright
Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Version
$Id$  

Properties

>VPropertyprotectedarray $_attribs = array()
Group attributes
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_decorators = array()
Display group decorators
Default valuearray()Details
Type
array
>VPropertyprotectedstring $_description
Description
Details
Type
string
>VPropertyprotectedbool $_disableLoadDefaultDecorators = false
Should we disable loading the default decorators?
Default valuefalseDetails
Type
bool
>VPropertyprotectedarray $_elementOrder = array()
Element order
Default valuearray()Details
Type
array
>VPropertyprotectedarray $_elements = array()
Elements
Default valuearray()Details
Type
array
>VPropertyprotected\Zend_Form $_form
Form object to which the display group is currently registered
Details
Type
\Zend_Form
>VPropertyprotectedbool $_groupUpdated = false
Whether or not a new element has been added to the group
Default valuefalseDetails
Type
bool
>VPropertyprotected\Zend_Loader_PluginLoader $_loader
Plugin loader for decorators
>VPropertyprotectedstring $_name
Group name
Details
Type
string
>VPropertyprotectedint $_order
Group order
Details
Type
int
>VPropertyprotected\Zend_Translate $_translator
Details
Type
\Zend_Translate
>VPropertyprotectedbool $_translatorDisabled = false
Is translation disabled?
Default valuefalseDetails
Type
bool
>VPropertyprotected\Zend_View_Interface $_view

Methods

methodpublic__call(string $method, array $args) : string

Overloading: allow rendering specific decorators

Call renderDecoratorName() to render a specific decorator.
Parameters
NameTypeDescription
$methodstring
$argsarray
Returns
TypeDescription
string
Throws
ExceptionDescription
\Zend_Form_Exceptionfor invalid decorator or invalid method call
methodpublic__construct(string $name, \Zend_Loader_PluginLoader $loader, array | \Zend_Config $options = null) : void

Constructor

Parameters
NameTypeDescription
$namestring
$loader\Zend_Loader_PluginLoader
$optionsarray | \Zend_Config
methodpublic__toString() : string

String representation of group

Returns
TypeDescription
string
methodprotected_getDecorator(string $name, null | array $options = null) : \Zend_Form_Decorator_Interface

Instantiate a decorator based on class name or class name fragment

Parameters
NameTypeDescription
$namestring
$optionsnull | array
Returns
TypeDescription
\Zend_Form_Decorator_Interface
methodprotected_loadDecorator(array $decorator, mixed $name) : \Zend_Form_Decorator_Interface

Lazy-load a decorator

Parameters
NameTypeDescription
$decoratorarray

Decorator type and options

$namemixed

Decorator name or alias

Returns
TypeDescription
\Zend_Form_Decorator_Interface
methodprotected_sort() : void

Sort items according to their order

methodpublicaddAttribs(array $attribs) : \Zend_Form_DisplayGroup

Add multiple form attributes at once

Parameters
NameTypeDescription
$attribsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicaddDecorator(string | \Zend_Form_Decorator_Interface $decorator, array | \Zend_Config $options = null) : \Zend_Form_DisplayGroup

Add a decorator for rendering the group

Parameters
NameTypeDescription
$decoratorstring | \Zend_Form_Decorator_Interface
$optionsarray | \Zend_Config

Options with which to initialize decorator

Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicaddDecorators(array $decorators) : \Zend_Form_DisplayGroup

Add many decorators at once

Parameters
NameTypeDescription
$decoratorsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicaddElement(\Zend_Form_Element $element) : \Zend_Form_DisplayGroup

Add element to stack

Parameters
NameTypeDescription
$element\Zend_Form_Element
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicaddElements(array $elements) : \Zend_Form_DisplayGroup

Add multiple elements at once

Parameters
NameTypeDescription
$elementsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
Throws
ExceptionDescription
\Zend_Form_Exceptionif any element is not a Zend_Form_Element
methodpublicaddPrefixPath(string $prefix, string $path) : \Zend_Form_DisplayGroup

Add a prefix path for the plugin loader

Parameters
NameTypeDescription
$prefixstring
$pathstring
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicaddPrefixPaths(array $spec) : \Zend_Form_DisplayGroup

Add several prefix paths at once

Parameters
NameTypeDescription
$specarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicclearAttribs() : \Zend_Form

Clear all form attributes

Returns
TypeDescription
\Zend_Form
methodpublicclearDecorators() : \Zend_Form_DisplayGroup

Clear all decorators

Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicclearElements() : \Zend_Form_DisplayGroup

Remove all elements

Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpubliccount() : int

Count of elements/subforms that are iterable

Returns
TypeDescription
int
methodpubliccurrent() : \Zend_Form_Element

Current element

Returns
TypeDescription
\Zend_Form_Element
methodpublicfilterName(string $value) : string

Filter a name to only allow valid variable characters

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
string
methodpublicgetAttrib(string $key) : mixed

Retrieve a single form attribute

Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
mixed
methodpublicgetAttribs() : array

Retrieve all form attributes/metadata

Returns
TypeDescription
array
methodpublicgetDecorator(string $name) : false | \Zend_Form_Decorator_Abstract

Retrieve a registered decorator

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
false | \Zend_Form_Decorator_Abstract
methodpublicgetDecorators() : array

Retrieve all decorators

Returns
TypeDescription
array
methodpublicgetDescription() : string

Get description

Returns
TypeDescription
string
methodpublicgetElement(string $name) : \Zend_Form_Element | null

Retrieve element

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_Form_Element | null
methodpublicgetElements() : array

Retrieve elements

Returns
TypeDescription
array
methodpublicgetForm() : \Zend_Form | null

Get form object to which the group is attached

Returns
TypeDescription
\Zend_Form | null
methodpublicgetFullyQualifiedName() : string

Get fully qualified name

Places name as subitem of array and/or appends brackets.
Returns
TypeDescription
string
methodpublicgetId() : string

Get element id

Returns
TypeDescription
string
methodpublicgetLegend() : string

Retrieve group legend

Returns
TypeDescription
string
methodpublicgetName() : string

Retrieve group name

Returns
TypeDescription
string
methodpublicgetOrder() : int

Retrieve group order

Returns
TypeDescription
int
methodpublicgetPluginLoader() : \Zend_Loader_PluginLoader

Retrieve plugin loader

Returns
TypeDescription
\Zend_Loader_PluginLoader
methodpublicgetTranslator() : \Zend_Translate_Adapter | null

Retrieve translator object

Returns
TypeDescription
\Zend_Translate_Adapter | null
methodpublicgetView() : \Zend_View_Interface

Retrieve view

Returns
TypeDescription
\Zend_View_Interface
methodpublichasTranslator() : bool

Does this display group have its own specific translator?

Returns
TypeDescription
bool
methodpublicinit() : void

Initialize object; used by extending classes

methodpublickey() : string

Current element

Returns
TypeDescription
string
methodpublicloadDefaultDecorators() : \Zend_Form_DisplayGroup

Load default decorators

Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicloadDefaultDecoratorsIsDisabled() : bool

Should we load the default decorators?

Returns
TypeDescription
bool
methodpublicnext() : void

Move pointer to next element

methodpublicremoveAttrib(string $key) : bool

Remove attribute

Parameters
NameTypeDescription
$keystring
Returns
TypeDescription
bool
methodpublicremoveDecorator(string $name) : bool

Remove a single decorator

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
bool
methodpublicremoveElement(string $name) : boolean

Remove a single element

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
boolean
methodpublicrender( $view = null) : string

Render display group

Parameters
NameTypeDescription
$view
Returns
TypeDescription
string
methodpublicrewind() : void

Move pointer to beginning of element loop

methodpublicsetAttrib(string $key, mixed $value) : \Zend_Form_DisplayGroup

Set group attribute

Parameters
NameTypeDescription
$keystring
$valuemixed
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetAttribs(array $attribs) : \Zend_Form_DisplayGroup

Set multiple form attributes at once

Overwrites any previously set attributes.
Parameters
NameTypeDescription
$attribsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetConfig(\Zend_Config $config) : \Zend_Form_DisplayGroup

Set options from config object

Parameters
NameTypeDescription
$config\Zend_Config
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetDecorators(array $decorators) : \Zend_Form_DisplayGroup

Overwrite all decorators

Parameters
NameTypeDescription
$decoratorsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetDescription(string $value) : \Zend_Form_DisplayGroup

Set description

Parameters
NameTypeDescription
$valuestring
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetDisableLoadDefaultDecorators(bool $flag) : \Zend_Form_Element

Set flag to disable loading default decorators

Parameters
NameTypeDescription
$flagbool
Returns
TypeDescription
\Zend_Form_Element
methodpublicsetDisableTranslator(bool $flag) : \Zend_Form_DisplayGroup

Indicate whether or not translation should be disabled

Parameters
NameTypeDescription
$flagbool
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetElements(array $elements) : \Zend_Form_DisplayGroup

Set multiple elements at once (overwrites)

Parameters
NameTypeDescription
$elementsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetForm(\Zend_Form $form) : \Zend_Form_DisplayGroup

Set form object to which the display group is attached

Parameters
NameTypeDescription
$form\Zend_Form
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetLegend(string $legend) : \Zend_Form_DisplayGroup

Set group legend

Parameters
NameTypeDescription
$legendstring
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetName(string $name) : \Zend_Form_DisplayGroup

Set group name

Parameters
NameTypeDescription
$namestring
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetOptions(array $options) : \Zend_Form_DisplayGroup

Set options

Parameters
NameTypeDescription
$optionsarray
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetOrder(int $order) : \Zend_Form_Element

Set group order

Parameters
NameTypeDescription
$orderint
Returns
TypeDescription
\Zend_Form_Element
methodpublicsetPluginLoader(\Zend_Loader_PluginLoader $loader) : \Zend_Form_DisplayGroup

Set plugin loader

Parameters
NameTypeDescription
$loader\Zend_Loader_PluginLoader
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetTranslator(\Zend_Translate | \Zend_Translate_Adapter | null $translator = null) : \Zend_Form_DisplayGroup

Set translator object

Parameters
NameTypeDescription
$translator\Zend_Translate | \Zend_Translate_Adapter | null
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublicsetView(\Zend_View_Interface $view = null) : \Zend_Form_DisplayGroup

Set view

Parameters
NameTypeDescription
$view\Zend_View_Interface
Returns
TypeDescription
\Zend_Form_DisplayGroup
methodpublictranslatorIsDisabled() : bool

Is translation disabled?

Returns
TypeDescription
bool
methodpublicvalid() : bool

Determine if current element/subform/display group is valid

Returns
TypeDescription
bool
Documentation was generated by phpDocumentor 2.2.0 .