interface FormConfigInterface
The configuration of a {@link Form} object.
EventDispatcherInterface | getEventDispatcher() Returns the event dispatcher used to dispatch form events. | |
string | getName() Returns the name of the form used as HTTP parameter. | |
PropertyPathInterface|null | getPropertyPath() Returns the property path that the form should be mapped to. | |
bool | getMapped() Returns whether the form should be mapped to an element of its parent's data. | |
bool | getByReference() Returns whether the form's data should be modified by reference. | |
bool | getInheritData() Returns whether the form should read and write the data of its parent. | |
bool | getCompound() Returns whether the form is compound. | |
ResolvedFormTypeInterface | getType() Returns the form types used to construct the form. | |
DataTransformerInterface[] | getViewTransformers() Returns the view transformers of the form. | |
DataTransformerInterface[] | getModelTransformers() Returns the model transformers of the form. | |
DataMapperInterface|null | getDataMapper() Returns the data mapper of the form. | |
bool | getRequired() Returns whether the form is required. | |
bool | getDisabled() Returns whether the form is disabled. | |
bool | getErrorBubbling() Returns whether errors attached to the form will bubble to its parent. | |
mixed | getEmptyData() Returns the data that should be returned when the form is empty. | |
array | getAttributes() Returns additional attributes of the form. | |
bool | hasAttribute(string $name) Returns whether the attribute with the given name exists. | |
mixed | getAttribute(string $name, mixed $default = null) Returns the value of the given attribute. | |
mixed | getData() Returns the initial data of the form. | |
string|null | getDataClass() Returns the class of the form data or null if the data is scalar or an array. | |
bool | getDataLocked() Returns whether the form's data is locked. | |
FormFactoryInterface | getFormFactory() Returns the form factory used for creating new forms. | |
string | getAction() Returns the target URL of the form. | |
string | getMethod() Returns the HTTP method used by the form. | |
RequestHandlerInterface | getRequestHandler() Returns the request handler used by the form. | |
bool | getAutoInitialize() Returns whether the form should be initialized upon creation. | |
array | getOptions() Returns all options passed during the construction of the form. | |
bool | hasOption(string $name) Returns whether a specific option exists. | |
mixed | getOption(string $name, mixed $default = null) Returns the value of a specific option. |
Returns the event dispatcher used to dispatch form events.
EventDispatcherInterface | The dispatcher |
Returns the name of the form used as HTTP parameter.
string | The form name |
Returns the property path that the form should be mapped to.
PropertyPathInterface|null | The property path |
Returns whether the form should be mapped to an element of its parent's data.
bool | Whether the form is mapped |
Returns whether the form's data should be modified by reference.
bool | Whether to modify the form's data by reference |
Returns whether the form should read and write the data of its parent.
bool | Whether the form should inherit its parent's data |
Returns whether the form is compound.
This property is independent of whether the form actually has children. A form can be compound and have no children at all, like for example an empty collection form.
bool | Whether the form is compound |
Returns the form types used to construct the form.
ResolvedFormTypeInterface | The form's type |
Returns the view transformers of the form.
DataTransformerInterface[] | An array of {@link DataTransformerInterface} instances |
Returns the model transformers of the form.
DataTransformerInterface[] | An array of {@link DataTransformerInterface} instances |
Returns the data mapper of the form.
DataMapperInterface|null | The data mapper |
Returns whether the form is required.
bool | Whether the form is required |
Returns whether the form is disabled.
bool | Whether the form is disabled |
Returns whether errors attached to the form will bubble to its parent.
bool | Whether errors will bubble up |
Returns the data that should be returned when the form is empty.
mixed | The data returned if the form is empty |
Returns additional attributes of the form.
array | An array of key-value combinations |
Returns whether the attribute with the given name exists.
string | $name | The attribute name |
bool | Whether the attribute exists |
Returns the value of the given attribute.
string | $name | The attribute name |
mixed | $default | The value returned if the attribute does not exist |
mixed | The attribute value |
Returns the initial data of the form.
mixed | The initial form data |
Returns the class of the form data or null if the data is scalar or an array.
string|null | The data class or null |
Returns whether the form's data is locked.
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.
bool | Whether the data is locked |
Returns the form factory used for creating new forms.
FormFactoryInterface | The form factory |
Returns the target URL of the form.
string | The target URL of the form |
Returns the HTTP method used by the form.
string | The HTTP method of the form |
Returns the request handler used by the form.
RequestHandlerInterface | The request handler |
Returns whether the form should be initialized upon creation.
bool | returns true if the form should be initialized when created, false otherwise |
Returns all options passed during the construction of the form.
array | The passed options |
Returns whether a specific option exists.
string | $name | The option name, |
bool | Whether the option exists |
Returns the value of a specific option.
string | $name | The option name |
mixed | $default | The value returned if the option does not exist |
mixed | The option value |
© 2004–2017 Fabien Potencier
Licensed under the MIT License.
https://api.symfony.com/4.1/Symfony/Component/Form/FormConfigInterface.html