interface FormInterface implements ArrayAccess, Traversable, Countable
A form group bundling multiple form forms
Methods
|
setParent(FormInterface $parent = null)
Sets the parent form. |
||
| FormInterface |
getParent()
Returns the parent form. |
|
| Boolean |
hasParent()
Returns whether the form has a parent. |
|
|
add(FormInterface $child)
Adds a child to the form. |
||
| Boolean |
has(string $name)
Returns whether a child with the given name exists. |
|
|
remove(string $name)
Removes a child from the form. |
||
| array |
getChildren()
Returns all children in this group. |
|
| Boolean |
hasChildren()
Return whether the form has children. |
|
| array |
getErrors()
Returns all errors. |
|
| Form |
setData(array $appData)
Updates the field with default data. |
|
| mixed |
getData()
Returns the data in the format needed for the underlying object. |
|
| mixed |
getNormData()
Returns the normalized data of the field. |
|
| string |
getClientData()
Returns the data transformed by the value transformer. |
|
| array |
getExtraData()
Returns the extra data. |
|
| Boolean |
isBound()
Returns whether the field is bound. |
|
| array |
getTypes()
Returns the supported types. |
|
| string |
getName()
Returns the name by which the form is identified in forms. |
|
|
addError(FormError $error)
Adds an error to this form. |
||
| Boolean |
isValid()
Returns whether the form is valid. |
|
| Boolean |
isRequired()
Returns whether the form is required to be filled out. |
|
| Boolean |
isReadOnly()
Returns whether this form can be read only. |
|
| Boolean |
isEmpty()
Returns whether the form is empty. |
|
| Boolean |
isSynchronized()
Returns whether the data in the different formats is synchronized. |
|
|
bind(mixed $data)
Writes data into the form. |
||
|
hasAttribute(string $name)
Returns whether the form has an attribute with the given name. |
||
|
getAttribute(string $name)
Returns the value of the attributes with the given name. |
||
| FormInterface |
getRoot()
Returns the root of the form tree. |
|
| Boolean |
isRoot()
Returns whether the field is the root of the form tree. |
|
| FormView |
createView(FormView $parent = null)
Creates a view. |
Details
at line 26
public
setParent(FormInterface $parent = null)
Sets the parent form.
at line 33
public FormInterface
getParent()
Returns the parent form.
at line 40
public Boolean
hasParent()
Returns whether the form has a parent.
at line 47
public
add(FormInterface $child)
Adds a child to the form.
at line 56
public Boolean
has(string $name)
Returns whether a child with the given name exists.
at line 63
public
remove(string $name)
Removes a child from the form.
at line 70
public array
getChildren()
Returns all children in this group.
at line 77
public Boolean
hasChildren()
Return whether the form has children.
at line 84
public array
getErrors()
Returns all errors.
at line 93
public Form
setData(array $appData)
Updates the field with default data.
at line 100
public mixed
getData()
Returns the data in the format needed for the underlying object.
at line 109
public mixed
getNormData()
Returns the normalized data of the field.
at line 116
public string
getClientData()
Returns the data transformed by the value transformer.
at line 123
public array
getExtraData()
Returns the extra data.
at line 130
public Boolean
isBound()
Returns whether the field is bound.
at line 137
public array
getTypes()
Returns the supported types.
at line 144
public string
getName()
Returns the name by which the form is identified in forms.
at line 151
public
addError(FormError $error)
Adds an error to this form.
at line 158
public Boolean
isValid()
Returns whether the form is valid.
at line 169
public Boolean
isRequired()
Returns whether the form is required to be filled out.
If the form has a parent and the parent is not required, this method
will always return false. Otherwise the value set with setRequired()
is returned.
at line 182
public Boolean
isReadOnly()
Returns whether this form can be read only.
The content of a read-only form is displayed, but not allowed to be
modified. The validation of modified read-only forms should fail.
Fields whose parents are read-only are considered read-only regardless of
their own state.
at line 189
public Boolean
isEmpty()
Returns whether the form is empty.
at line 196
public Boolean
isSynchronized()
Returns whether the data in the different formats is synchronized.
at line 203
public
bind(mixed $data)
Writes data into the form.
at line 210
public
hasAttribute(string $name)
Returns whether the form has an attribute with the given name.
at line 217
public
getAttribute(string $name)
Returns the value of the attributes with the given name.
at line 224
public FormInterface
getRoot()
Returns the root of the form tree.
at line 231
public Boolean
isRoot()
Returns whether the field is the root of the form tree.
at line 240
public FormView
createView(FormView $parent = null)
Creates a view.