interface FormBuilderInterface implements Traversable, Countable, FormConfigBuilderInterface
Methods
| FormConfigBuilderInterface |
addEventListener(string $eventName, callable $listener, integer $priority)
Adds an event listener to an event on this form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
addEventSubscriber(EventSubscriberInterface $subscriber)
Adds an event subscriber for events on this form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
addViewTransformer(DataTransformerInterface $viewTransformer, Boolean $forcePrepend = false)
Appends / prepends a transformer to the view transformer chain. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
resetViewTransformers()
Clears the view transformers. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
addModelTransformer(DataTransformerInterface $modelTransformer, Boolean $forceAppend = false)
Prepends / appends a transformer to the normalization transformer chain. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
resetModelTransformers()
Clears the normalization transformers. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setAttribute(string $name, string $value)
Sets the value for an attribute. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setAttributes(array $attributes)
Sets the attributes. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setDataMapper(DataMapperInterface $dataMapper = null)
Sets the data mapper used by the form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setDisabled(Boolean $disabled)
Set whether the form is disabled. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setEmptyData(mixed $emptyData)
Sets the data used for the client data when no value is submitted. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setErrorBubbling(Boolean $errorBubbling)
Sets whether errors bubble up to the parent. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setRequired(Boolean $required)
Sets whether this field is required to be filled out when submitted. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setPropertyPath(null|string|PropertyPathInterface $propertyPath)
Sets the property path that the form should be mapped to. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setMapped(Boolean $mapped)
Sets whether the form should be mapped to an element of its parent's data. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setByReference(Boolean $byReference)
Sets whether the form's data should be modified by reference. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setInheritData(Boolean $inheritData)
Sets whether the form should read and write the data of its parent. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setCompound(Boolean $compound)
Sets whether the form should be compound. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setType(ResolvedFormTypeInterface $type)
Set the types. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setData(array $data)
Sets the initial data of the form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setDataLocked(Boolean $locked)
Locks the form's data to the data passed in the configuration. |
from FormConfigBuilderInterface |
|
setFormFactory(FormFactoryInterface $formFactory)
Sets the form factory used for creating new forms. |
from FormConfigBuilderInterface | |
| FormConfigBuilderInterface |
setAction(string $action)
Sets the target URL of the form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setMethod(string $method)
Sets the HTTP method used by the form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setRequestHandler(RequestHandlerInterface $requestHandler)
Sets the request handler used by the form. |
from FormConfigBuilderInterface |
| FormConfigBuilderInterface |
setAutoInitialize(Boolean $initialize)
Sets whether the form should be initialized automatically. |
from FormConfigBuilderInterface |
| FormConfigInterface |
getFormConfig()
Builds and returns the form configuration. |
from FormConfigBuilderInterface |
| FormBuilderInterface |
add(string|integer|FormBuilderInterface $child, string|FormTypeInterface $type = null, array $options = array())
Adds a new field to this group. |
|
| FormBuilderInterface |
create(string $name, string|FormTypeInterface $type = null, array $options = array())
Creates a form builder. |
|
| FormBuilderInterface |
get(string $name)
Returns a child by name. |
|
| FormBuilderInterface |
remove(string $name)
Removes the field with the given name. |
|
| Boolean |
has(string $name)
Returns whether a field with the given name exists. |
|
| array |
all()
Returns the children. |
|
| Form |
getForm()
Creates the form. |
Details
in FormConfigBuilderInterface at line 32
public FormConfigBuilderInterface
addEventListener(string $eventName, callable $listener, integer $priority)
Adds an event listener to an event on this form.
in FormConfigBuilderInterface at line 41
public FormConfigBuilderInterface
addEventSubscriber(EventSubscriberInterface $subscriber)
Adds an event subscriber for events on this form.
in FormConfigBuilderInterface at line 56
public FormConfigBuilderInterface
addViewTransformer(DataTransformerInterface $viewTransformer, Boolean $forcePrepend = false)
Appends / prepends a transformer to the view transformer chain.
The transform method of the transformer is used to convert data from the
normalized to the view format.
The reverseTransform method of the transformer is used to convert from the
view to the normalized format.
in FormConfigBuilderInterface at line 63
public FormConfigBuilderInterface
resetViewTransformers()
Clears the view transformers.
in FormConfigBuilderInterface at line 78
public FormConfigBuilderInterface
addModelTransformer(DataTransformerInterface $modelTransformer, Boolean $forceAppend = false)
Prepends / appends a transformer to the normalization transformer chain.
The transform method of the transformer is used to convert data from the
model to the normalized format.
The reverseTransform method of the transformer is used to convert from the
normalized to the model format.
in FormConfigBuilderInterface at line 85
public FormConfigBuilderInterface
resetModelTransformers()
Clears the normalization transformers.
in FormConfigBuilderInterface at line 95
public FormConfigBuilderInterface
setAttribute(string $name, string $value)
Sets the value for an attribute.
in FormConfigBuilderInterface at line 104
public FormConfigBuilderInterface
setAttributes(array $attributes)
Sets the attributes.
in FormConfigBuilderInterface at line 113
public FormConfigBuilderInterface
setDataMapper(DataMapperInterface $dataMapper = null)
Sets the data mapper used by the form.
in FormConfigBuilderInterface at line 122
public FormConfigBuilderInterface
setDisabled(Boolean $disabled)
Set whether the form is disabled.
in FormConfigBuilderInterface at line 131
public FormConfigBuilderInterface
setEmptyData(mixed $emptyData)
Sets the data used for the client data when no value is submitted.
in FormConfigBuilderInterface at line 140
public FormConfigBuilderInterface
setErrorBubbling(Boolean $errorBubbling)
Sets whether errors bubble up to the parent.
in FormConfigBuilderInterface at line 149
public FormConfigBuilderInterface
setRequired(Boolean $required)
Sets whether this field is required to be filled out when submitted.
in FormConfigBuilderInterface at line 160
public FormConfigBuilderInterface
setPropertyPath(null|string|PropertyPathInterface $propertyPath)
Sets the property path that the form should be mapped to.
in FormConfigBuilderInterface at line 170
public FormConfigBuilderInterface
setMapped(Boolean $mapped)
Sets whether the form should be mapped to an element of its parent's data.
in FormConfigBuilderInterface at line 180
public FormConfigBuilderInterface
setByReference(Boolean $byReference)
Sets whether the form's data should be modified by reference.
in FormConfigBuilderInterface at line 189
public FormConfigBuilderInterface
setInheritData(Boolean $inheritData)
Sets whether the form should read and write the data of its parent.
in FormConfigBuilderInterface at line 200
public FormConfigBuilderInterface
setCompound(Boolean $compound)
Sets whether the form should be compound.
in FormConfigBuilderInterface at line 209
public FormConfigBuilderInterface
setType(ResolvedFormTypeInterface $type)
Set the types.
in FormConfigBuilderInterface at line 218
public FormConfigBuilderInterface
setData(array $data)
Sets the initial data of the form.
in FormConfigBuilderInterface at line 231
public FormConfigBuilderInterface
setDataLocked(Boolean $locked)
Locks the form's data to the data passed in the configuration.
A form with locked data is restricted to the data passed in
this configuration. The data can only be modified then by
submitting the form.
in FormConfigBuilderInterface at line 238
public
setFormFactory(FormFactoryInterface $formFactory)
Sets the form factory used for creating new forms.
in FormConfigBuilderInterface at line 247
public FormConfigBuilderInterface
setAction(string $action)
Sets the target URL of the form.
in FormConfigBuilderInterface at line 256
public FormConfigBuilderInterface
setMethod(string $method)
Sets the HTTP method used by the form.
in FormConfigBuilderInterface at line 265
public FormConfigBuilderInterface
setRequestHandler(RequestHandlerInterface $requestHandler)
Sets the request handler used by the form.
in FormConfigBuilderInterface at line 279
public FormConfigBuilderInterface
setAutoInitialize(Boolean $initialize)
Sets whether the form should be initialized automatically.
Should be set to true only for root forms.
in FormConfigBuilderInterface at line 286
public FormConfigInterface
getFormConfig()
Builds and returns the form configuration.
at line 32
public FormBuilderInterface
add(string|integer|FormBuilderInterface $child, string|FormTypeInterface $type = null, array $options = array())
Adds a new field to this group.
A field must have a unique name within
the group. Otherwise the existing field is overwritten.
If you add a nested group, this group should also be represented in the
object hierarchy.
at line 43
public FormBuilderInterface
create(string $name, string|FormTypeInterface $type = null, array $options = array())
Creates a form builder.
at line 54
public FormBuilderInterface
get(string $name)
Returns a child by name.
at line 63
public FormBuilderInterface
remove(string $name)
Removes the field with the given name.
at line 72
public Boolean
has(string $name)
Returns whether a field with the given name exists.
at line 79
public array
all()
Returns the children.
at line 86
public Form
getForm()
Creates the form.