Zend Framework  3.0
Public Member Functions | List of all members
FieldsetInterface Interface Reference

Public Member Functions

 add ($elementOrFieldset, array $flags=[])
 Add an element or fieldset.
 
 has ($elementOrFieldset)
 Does the fieldset have an element/fieldset by the given name?
 
 get ($elementOrFieldset)
 Retrieve a named element or fieldset.
 
 remove ($elementOrFieldset)
 Remove a named element or fieldset.
 
 setPriority ($elementOrFieldset, $priority)
 Set/change the priority of an element or fieldset.
 
 getElements ()
 Retrieve all attached elements.
 
 getFieldsets ()
 Retrieve all attached fieldsets.
 
 populateValues ($data)
 Recursively populate value attributes of elements.
 
 setObject ($object)
 Set the object used by the hydrator.
 
 getObject ()
 Get the object used by the hydrator.
 
 allowObjectBinding ($object)
 Checks if the object can be set in this fieldset.
 
 setHydrator (HydratorInterface $hydrator)
 Set the hydrator to use when binding an object to the element.
 
 getHydrator ()
 Get the hydrator used when binding an object to the element.
 
 bindValues (array $values=[])
 Bind values to the bound object.
 
 allowValueBinding ()
 Checks if this fieldset can bind data.
 
- Public Member Functions inherited from ElementInterface
 setName ($name)
 Set the name of this element.
 
 getName ()
 Retrieve the element name.
 
 setOptions ($options)
 Set options for an element.
 
 setOption ($key, $value)
 Set a single option for an element.
 
 getOptions ()
 get the defined options
 
 getOption ($option)
 return the specified option
 
 setAttribute ($key, $value)
 Set a single element attribute.
 
 getAttribute ($key)
 Retrieve a single element attribute.
 
 hasAttribute ($key)
 Return true if a specific attribute is set.
 
 setAttributes ($arrayOrTraversable)
 Set many attributes at once.
 
 getAttributes ()
 Retrieve all attributes at once.
 
 setValue ($value)
 Set the value of the element.
 
 getValue ()
 Retrieve the element value.
 
 setLabel ($label)
 Set the label (if any) used for this element.
 
 getLabel ()
 Retrieve the label (if any) used for this element.
 
 setMessages ($messages)
 Set a list of messages to report when validation fails.
 
 getMessages ()
 Get validation error messages, if any.
 
- Public Member Functions inherited from ElementPrepareAwareInterface
 prepareElement (FormInterface $form)
 Prepare the form element (mostly used for rendering purposes)
 
- Public Member Functions inherited from FormFactoryAwareInterface
 setFormFactory (Factory $factory)
 Compose a form factory into the object.
 

Member Function Documentation

add (   $elementOrFieldset,
array  $flags = [] 
)

Add an element or fieldset.

$flags could contain metadata such as the alias under which to register the element or fieldset, order in which to prioritize it, etc.

Parameters
array | \Traversable | ElementInterface$elementOrFieldsetTypically, only allow objects implementing ElementInterface; however, keeping it flexible to allow a factory-based form implementation as well
array$flags
Returns
FieldsetInterface

Implemented in Form, and Fieldset.

allowObjectBinding (   $object)

Checks if the object can be set in this fieldset.

Parameters
$object
Returns
bool

Implemented in Fieldset, and Collection.

allowValueBinding ( )

Checks if this fieldset can bind data.

Returns
bool

Implemented in Fieldset, and Collection.

bindValues ( array  $values = [])

Bind values to the bound object.

Parameters
array$values
Returns
mixed

Implemented in Fieldset, Form, and Collection.

get (   $elementOrFieldset)

Retrieve a named element or fieldset.

Parameters
string$elementOrFieldset
Returns
ElementInterface

Implemented in Fieldset.

getElements ( )

Retrieve all attached elements.

Storage is an implementation detail of the concrete class.

Returns
array|

Implemented in Fieldset.

getFieldsets ( )

Retrieve all attached fieldsets.

Storage is an implementation detail of the concrete class.

Returns
array|

Implemented in Fieldset.

getHydrator ( )

Get the hydrator used when binding an object to the element.

Returns
null|HydratorInterface

Implemented in Fieldset.

getObject ( )

Get the object used by the hydrator.

Returns
mixed

Implemented in Fieldset.

has (   $elementOrFieldset)

Does the fieldset have an element/fieldset by the given name?

Parameters
string$elementOrFieldset
Returns
bool

Implemented in Fieldset.

populateValues (   $data)

Recursively populate value attributes of elements.

Parameters
array | \Traversable$data
Returns
void

Implemented in Fieldset, and Collection.

remove (   $elementOrFieldset)

Remove a named element or fieldset.

Parameters
string$elementOrFieldset
Returns
FieldsetInterface

Implemented in Fieldset.

setHydrator ( HydratorInterface  $hydrator)

Set the hydrator to use when binding an object to the element.

Parameters
HydratorInterface$hydrator
Returns
FieldsetInterface

Implemented in Fieldset, and Form.

setObject (   $object)

Set the object used by the hydrator.

Parameters
$object
Returns
FieldsetInterface

Implemented in Fieldset, and Collection.

setPriority (   $elementOrFieldset,
  $priority 
)

Set/change the priority of an element or fieldset.

Parameters
string$elementOrFieldset
int$priority
Returns
FieldsetInterface

Implemented in Fieldset.