Interface FieldsetInterface

Summary

Fully Qualified Name: Laminas\Form\FieldsetInterface
Extends: Countable, IteratorAggregate, ElementInterface, ElementPrepareAwareInterface, FormFactoryAwareInterface

Description

Methods

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

Method Details

add()

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.

Parameter Name Type Description
$elementOrFieldset array|\Traversable|\ElementInterface Typically,
$flags array

Returns: $this

allowObjectBinding()

Checks if the object can be set in this fieldset

Parameter Name Type Description
$object
$object

Returns: bool

allowValueBinding()

Checks if this fieldset can bind data

Returns: bool

bindValues()

Bind values to the bound object

Parameter Name Type Description
$values array

Returns: mixed

get()

Retrieve a named element or fieldset

Parameter Name Type Description
$elementOrFieldset string

Returns: \ElementInterface

getAttribute()

Retrieve a single element attribute

Parameter Name Type Description
$key string

Returns: mixed

getAttributes()

Retrieve all attributes at once

Returns: array|\Traversable

getElements()

Retrieve all attached elements

Storage is an implementation detail of the concrete class.

Returns: array|\Traversable

getFieldsets()

Retrieve all attached fieldsets

Storage is an implementation detail of the concrete class.

Returns: array|\Traversable

getHydrator()

Get the hydrator used when binding an object to the element

Returns: null|\HydratorInterface

getLabel()

Retrieve the label (if any) used for this element

Returns: string

getMessages()

Get validation error messages, if any

Returns a list of validation failure messages, if any.

Returns: array|\Traversable

getName()

Retrieve the element name

Returns: string

getObject()

Get the object used by the hydrator

Returns: mixed

getOption()

return the specified option

Parameter Name Type Description
$option string

Returns: null|mixed

getOptions()

get the defined options

Returns: array

getValue()

Retrieve the element value

Returns: mixed

has()

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

Parameter Name Type Description
$elementOrFieldset string

Returns: bool

hasAttribute()

Return true if a specific attribute is set

Parameter Name Type Description
$key string

Returns: bool

populateValues()

Recursively populate value attributes of elements

Parameter Name Type Description
$data array|\Traversable

Returns: void

prepareElement()

Prepare the form element (mostly used for rendering purposes)

Parameter Name Type Description
$form \FormInterface

Returns: mixed

remove()

Remove a named element or fieldset

Parameter Name Type Description
$elementOrFieldset string

Returns: $this

setAttribute()

Set a single element attribute

Parameter Name Type Description
$key string
$value mixed

Returns: $this

setAttributes()

Set many attributes at once

Implementation will decide if this will overwrite or merge.

Parameter Name Type Description
$arrayOrTraversable array|\Traversable

Returns: $this

setFormFactory()

Compose a form factory into the object

Parameter Name Type Description
$factory \Factory

Returns:

setHydrator()

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

Parameter Name Type Description
$hydrator \HydratorInterface

Returns: $this

setLabel()

Set the label (if any) used for this element

Parameter Name Type Description
$label
$label

Returns: $this

setMessages()

Set a list of messages to report when validation fails

Parameter Name Type Description
$messages array|\Traversable

Returns: $this

setName()

Set the name of this element

In most cases, this will proxy to the attributes for storage, but is present to indicate that elements are generally named.

Parameter Name Type Description
$name string

Returns: $this

setObject()

Set the object used by the hydrator

Parameter Name Type Description
$object
$object

Returns: $this

setOption()

Set a single option for an element

Parameter Name Type Description
$key string
$value mixed

Returns: $this

setOptions()

Set options for an element

Parameter Name Type Description
$options array|\Traversable

Returns: $this

setPriority()

Set/change the priority of an element or fieldset

Parameter Name Type Description
$elementOrFieldset string
$priority int

Returns: $this

setValue()

Set the value of the element

Parameter Name Type Description
$value mixed

Returns: $this

Top