FormInterface::add()

FormInterface add(FormInterface|string|int $child, string|null $type = null, array $options = array())

Adds or replaces a child to the form.

Parameters

FormInterface|string|int $child The FormInterface instance or the name of the child
string|null $type The child's type, if a name was passed
array $options The child's options, if a name was passed

Return Value

FormInterface The form instance

Exceptions

AlreadySubmittedException If the form has already been submitted.
LogicException When trying to add a child to a non-compound form.
UnexpectedTypeException If $child or $type has an unexpected type.
doc_Symfony
2016-10-28 06:18:57
Comments
Leave a Comment

Please login to continue.