code: 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;
      }
docs: Sets the form instance.
  
  @param FormInterface|Container $form
  
  @return self
  @throws \InvalidArgumentException