/** * @param object|null $resource * @return FormInterface */ public function getForm($resource = null) { if ($this->config->isApiRequest()) { return $this->container->get('form.factory')->createNamed('', $this->config->getFormType(), $resource); } return $this->createForm($this->config->getFormType(), $resource); }