src/Form/Form.php
public function add($elementOrFieldset, array $flags = array())
    {
        parent::add($elementOrFieldset, $flags);
        if ($elementOrFieldset instanceof FormParentInterface) {
            $elementOrFieldset->setParent($this);
        }
        return $this;
    }
public function add($elementOrFieldset, array $flags = array())
    {
        parent::add($elementOrFieldset, $flags);
        if ($elementOrFieldset instanceof FormParentInterface) {
            $elementOrFieldset->setParent($this);
        }
        return $this;
    }
@param array|\Traversable|\Zend\Form\ElementInterface $elementOrFieldset
@param array                                          $flags

@return $this