FormConfigInterface
interface FormConfigInterface
The configuration of a {@link Form} object.
Methods
Returns the event dispatcher used to dispatch form events.
Returns the name of the form used as HTTP parameter.
Returns the property path that the form should be mapped to.
Returns whether the form should be mapped to an element of its parent's data.
Returns whether the form's data should be modified by reference.
Returns whether the form should read and write the data of its parent.
Returns whether the form is compound.
Returns the resolved form type used to construct the form.
Returns the view transformers of the form.
Returns the model transformers of the form.
Returns the data mapper of the compound form or null for a simple form.
Returns whether the form is required.
Returns whether the form is disabled.
Returns whether errors attached to the form will bubble to its parent.
Used when the view data is empty on submission.
Returns additional attributes of the form.
Returns whether the attribute with the given name exists.
Returns the value of the given attribute.
Returns the initial data of the form.
Returns the class of the view data or null if the data is scalar or an array.
Returns whether the form's data is locked.
Returns the form factory used for creating new forms.
Returns the target URL of the form.
Returns the HTTP method used by the form.
Returns the request handler used by the form.
Returns whether the form should be initialized upon creation.
Returns all options passed during the construction of the form.
Returns whether a specific option exists.
Returns the value of a specific option.
Returns a callable that takes the model data as argument and that returns if it is empty or not.
Details
EventDispatcherInterface
getEventDispatcher()
Returns the event dispatcher used to dispatch form events.
PropertyPathInterface|null
getPropertyPath()
Returns the property path that the form should be mapped to.
bool
getCompound()
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. The contrary is not possible, a form which is not compound cannot have any children.
DataMapperInterface|null
getDataMapper()
Returns the data mapper of the compound form or null for a simple form.
mixed
getEmptyData()
Used when the view data is empty on submission.
When the form is compound it will also be used to map the children data.
The empty data must match the view format as it will passed to the first view transformer's "reverseTransform" method.
string|null
getDataClass()
Returns the class of the view data or null if the data is scalar or an array.