API Documentation

Zend/Form/DisplayGroup.php

Show: inherited
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-2012 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-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  
Used_by
\Zend_Dojo_Form_DisplayGroup  
Version
$Id: DisplayGroup.php 24594 2012-01-05 21:27:01Z matthew $  

Properties

Propertyprotectedarray  $_attribs= 'array()'

Group attributes

Default valuearray()Details
Type
array
Propertyprotectedarray  $_decorators= 'array()'

Display group decorators

Default valuearray()Details
Type
array
Propertyprotectedstring  $_description= ''

Description

Details
Type
string
Propertyprotectedbool  $_disableLoadDefaultDecorators= 'false'

Should we disable loading the default decorators?

Default valuefalseDetails
Type
bool
Propertyprotectedarray  $_elementOrder= 'array()'

Element order

Default valuearray()Details
Type
array
Propertyprotectedarray  $_elements= 'array()'

Elements

Default valuearray()Details
Type
array
Propertyprotected\Zend_Form  $_form= ''

Form object to which the display group is currently registered

Details
Type
\Zend_Form
Propertyprotectedbool  $_groupUpdated= 'false'

Whether or not a new element has been added to the group

Default valuefalseDetails
Type
bool
Propertyprotected\Zend_Loader_PluginLoader  $_loader= ''

Plugin loader for decorators

Propertyprotectedstring  $_name= ''

Group name

Details
Type
string
Propertyprotectedint  $_order= ''

Group order

Details
Type
int
Propertyprotected\Zend_Translate  $_translator= ''

Details
Type
\Zend_Translate
Propertyprotectedbool  $_translatorDisabled= 'false'

Is translation disabled?

Default valuefalseDetails
Type
bool
Propertyprotected\Zend_View_Interface  $_view= ''

Details
Type
\Zend_View_Interface

Methods

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

Overloading: allow rendering specific decorators

Call renderDecoratorName() to render a specific decorator.

Parameters
Name Type Description
$method string
$args array
Returns
Type Description
string
Throws
Exception Description
\Zend_Form_Exception for invalid decorator or invalid method call
methodpublic__construct( string $name, \Zend_Loader_PluginLoader $loader, array|\Zend_Config $options = null ) : void

Constructor

Parameters
Name Type Description
$name string
$loader \Zend_Loader_PluginLoader
$options array|\Zend_Config
methodpublic__toString( ) : string

String representation of group

Returns
Type Description
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
Name Type Description
$name string
$options null|array
Returns
Type Description
\Zend_Form_Decorator_Interface
methodprotected_loadDecorator( array $decorator, mixed $name ) : \Zend_Form_Decorator_Interface

Lazy-load a decorator

Parameters
Name Type Description
$decorator array

Decorator type and options

$name mixed

Decorator name or alias

Returns
Type Description
\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
Name Type Description
$attribs array
Returns
Type Description
\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
Name Type Description
$decorator string|\Zend_Form_Decorator_Interface
$options array|\Zend_Config

Options with which to initialize decorator

Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicaddDecorators( array $decorators ) : \Zend_Form_DisplayGroup

Add many decorators at once

Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicaddElement( \Zend_Form_Element $element ) : \Zend_Form_DisplayGroup

Add element to stack

Parameters
Name Type Description
$element \Zend_Form_Element
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicaddElements( array $elements ) : \Zend_Form_DisplayGroup

Add multiple elements at once

Parameters
Name Type Description
$elements array
Returns
Type Description
\Zend_Form_DisplayGroup
Throws
Exception Description
\Zend_Form_Exception if 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
Name Type Description
$prefix string
$path string
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicaddPrefixPaths( array $spec ) : \Zend_Form_DisplayGroup

Add several prefix paths at once

Parameters
Name Type Description
$spec array
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicclearAttribs( ) : \Zend_Form

Clear all form attributes

Returns
Type Description
\Zend_Form
methodpublicclearDecorators( ) : \Zend_Form_DisplayGroup

Clear all decorators

Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicclearElements( ) : \Zend_Form_DisplayGroup

Remove all elements

Returns
Type Description
\Zend_Form_DisplayGroup
methodpubliccount( ) : int

Count of elements/subforms that are iterable

Returns
Type Description
int
methodpubliccurrent( ) : \Zend_Form_Element

Current element

Returns
Type Description
\Zend_Form_Element
methodpublicfilterName( string $value ) : string

Filter a name to only allow valid variable characters

Parameters
Name Type Description
$value string
Returns
Type Description
string
methodpublicgetAttrib( string $key ) : mixed

Retrieve a single form attribute

Parameters
Name Type Description
$key string
Returns
Type Description
mixed
methodpublicgetAttribs( ) : array

Retrieve all form attributes/metadata

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

Retrieve a registered decorator

Parameters
Name Type Description
$name string
Returns
Type Description
false|\Zend_Form_Decorator_Abstract
methodpublicgetDecorators( ) : array

Retrieve all decorators

Returns
Type Description
array
methodpublicgetDescription( ) : string

Get description

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

Retrieve element

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_Element|null
methodpublicgetElements( ) : array

Retrieve elements

Returns
Type Description
array
methodpublicgetForm( ) : \Zend_Form|null

Get form object to which the group is attached

Returns
Type Description
\Zend_Form|null
methodpublicgetFullyQualifiedName( ) : string

Get fully qualified name

Places name as subitem of array and/or appends brackets.

Returns
Type Description
string
methodpublicgetId( ) : string

Get element id

Returns
Type Description
string
methodpublicgetLegend( ) : string

Retrieve group legend

Returns
Type Description
string
methodpublicgetName( ) : string

Retrieve group name

Returns
Type Description
string
methodpublicgetOrder( ) : int

Retrieve group order

Returns
Type Description
int
methodpublicgetPluginLoader( ) : \Zend_Loader_PluginLoader

Retrieve plugin loader

Returns
Type Description
\Zend_Loader_PluginLoader
methodpublicgetTranslator( ) : \Zend_Translate_Adapter|null

Retrieve translator object

Returns
Type Description
\Zend_Translate_Adapter|null
methodpublicgetView( ) : \Zend_View_Interface

Retrieve view

Returns
Type Description
\Zend_View_Interface
methodpublicinit( ) : void

Initialize object; used by extending classes

methodpublickey( ) : string

Current element

Returns
Type Description
string
methodpublicloadDefaultDecorators( ) : \Zend_Form_DisplayGroup

Load default decorators

Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicloadDefaultDecoratorsIsDisabled( ) : bool

Should we load the default decorators?

Returns
Type Description
bool
methodpublicnext( ) : void

Move pointer to next element

methodpublicremoveAttrib( string $key ) : bool

Remove attribute

Parameters
Name Type Description
$key string
Returns
Type Description
bool
methodpublicremoveDecorator( string $name ) : bool

Remove a single decorator

Parameters
Name Type Description
$name string
Returns
Type Description
bool
methodpublicremoveElement( string $name ) : boolean

Remove a single element

Parameters
Name Type Description
$name string
Returns
Type Description
boolean
methodpublicrender(  $view = null ) : string

Render display group

Parameters
Name Type Description
$view
Returns
Type Description
string
methodpublicrewind( ) : void

Move pointer to beginning of element loop

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

Set group attribute

Parameters
Name Type Description
$key string
$value mixed
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetAttribs( array $attribs ) : \Zend_Form_DisplayGroup

Set multiple form attributes at once

Overwrites any previously set attributes.

Parameters
Name Type Description
$attribs array
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetConfig( \Zend_Config $config ) : \Zend_Form_DisplayGroup

Set options from config object

Parameters
Name Type Description
$config \Zend_Config
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetDecorators( array $decorators ) : \Zend_Form_DisplayGroup

Overwrite all decorators

Parameters
Name Type Description
$decorators array
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetDescription( string $value ) : \Zend_Form_DisplayGroup

Set description

Parameters
Name Type Description
$value string
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetDisableLoadDefaultDecorators( bool $flag ) : \Zend_Form_Element

Set flag to disable loading default decorators

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_Element
methodpublicsetDisableTranslator( bool $flag ) : \Zend_Form_DisplayGroup

Indicate whether or not translation should be disabled

Parameters
Name Type Description
$flag bool
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetElements( array $elements ) : \Zend_Form_DisplayGroup

Set multiple elements at once (overwrites)

Parameters
Name Type Description
$elements array
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetForm( \Zend_Form $form ) : \Zend_Form_DisplayGroup

Set form object to which the display group is attached

Parameters
Name Type Description
$form \Zend_Form
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetLegend( string $legend ) : \Zend_Form_DisplayGroup

Set group legend

Parameters
Name Type Description
$legend string
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetName( string $name ) : \Zend_Form_DisplayGroup

Set group name

Parameters
Name Type Description
$name string
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetOptions( array $options ) : \Zend_Form_DisplayGroup

Set options

Parameters
Name Type Description
$options array
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetOrder( int $order ) : \Zend_Form_Element

Set group order

Parameters
Name Type Description
$order int
Returns
Type Description
\Zend_Form_Element
methodpublicsetPluginLoader( \Zend_Loader_PluginLoader $loader ) : \Zend_Form_DisplayGroup

Set plugin loader

Parameters
Name Type Description
$loader \Zend_Loader_PluginLoader
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetTranslator( \Zend_Translate|\Zend_Translate_Adapter|null $translator = null ) : \Zend_Form_DisplayGroup

Set translator object

Parameters
Name Type Description
$translator \Zend_Translate|\Zend_Translate_Adapter|null
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublicsetView( \Zend_View_Interface $view = null ) : \Zend_Form_DisplayGroup

Set view

Parameters
Name Type Description
$view \Zend_View_Interface
Returns
Type Description
\Zend_Form_DisplayGroup
methodpublictranslatorIsDisabled( ) : bool

Is translation disabled?

Returns
Type Description
bool
methodpublicvalid( ) : bool

Determine if current element/subform/display group is valid

Returns
Type Description
bool
Documentation was generated by DocBlox 0.15.1.