Symfony\Component\Form\FormInterface::add
Adds a child to the form.
Signature
Parameters
$child
—
object
- The FormInterface instance or the name of the child.
$type
—
object
- The child's type, if a name was passed.
$options
—
array
- The child's options, if a name was passed.
Returns
- FormInterface
- The form instance
Errors/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.