public function setForm($formOrContainer)
    {
        if (!$formOrContainer instanceof FormInterface
            && !$formOrContainer instanceof Container
        ) {
            throw new \InvalidArgumentException('Parameter must be either of type "\Zend\Form\FormInterface" or "\Core\Form\Container"');
        }

        $this->form = $formOrContainer;
        $this->generateCheckboxes();

        return $this;
    }
public function setForm($formOrContainer)
    {
        if (!$formOrContainer instanceof FormInterface
            && !$formOrContainer instanceof Container
        ) {
            throw new \InvalidArgumentException('Parameter must be either of type "\Zend\Form\FormInterface" or "\Core\Form\Container"');
        }

        $this->form = $formOrContainer;
        $this->generateCheckboxes();

        return $this;
    }
public function setForm ( $ formOrContainer ) { if ( ! $ formOrContainer instanceof FormInterface && ! $ formOrContainer instanceof Container ) { throw new \ InvalidArgumentException ( 'Parameter must be either of type "\Zend\Form\FormInterface" or "\Core\Form\Container"' ) ; } $ this -> form = $ formOrContainer ; $ this -> generateCheckboxes ( ) ; return $ this ; }
Sets the target form or form container.

@param \Zend\Form\FormInterface|\Core\Form\Container $formOrContainer

@return self
@throws \InvalidArgumentException if invalid form type is passed.
Sets the target form or form container .