Zend\Form\Form::add
Add an element or fieldset
If $elementOrFieldset is an array or Traversable, passes the argument on to the composed factory to create the object before attaching it. $flags could contain metadata such as the alias under which to register the element or fieldset, order in which to prioritize it, etc.
Signature
public function add(array|Traversable|ElementInterface
$elementOrFieldset,
array
$flags )
Parameters
$elementOrFieldset
— object
$flags
— array
Returns
- FormInterface
Defined by Interface
Parent Implementation
Line | Task |
---|---|
171 | find a better solution than duplicating the factory code, the problem being that if $elementOrFieldset is an array, |