src/Form/Event/FormEvent.php
public function setForm($form)
    {
        if (!$form instanceof FormInterface && !$form instanceof Container) {
            throw new \InvalidArgumentException('Form must either implement \Zend\Form\FormInterface or extend from \Core\Form\Container');
        }

        $this->form = $form;

        return $this;
    }
public function setForm($form)
    {
        if (!$form instanceof FormInterface && !$form instanceof Container) {
            throw new \InvalidArgumentException('Form must either implement \Zend\Form\FormInterface or extend from \Core\Form\Container');
        }

        $this->form = $form;

        return $this;
    }
public function setForm ( $ form ) { if ( ! $ form instanceof FormInterface && ! $ form instanceof Container ) { throw new \ InvalidArgumentException ( 'Form must either implement \Zend\Form\FormInterface or extend from \Core\Form\Container' ) ; } $ this -> form = $ form ; return $ this ; }
Sets the form instance.

@param FormInterface|Container $form

@return self
@throws \InvalidArgumentException
Sets the form instance .