code: protected function generateForm($bundle, $entity, $metadata, $forceOverwrite = false)
      {
          $this->getFormGenerator($bundle)->generate($bundle, $entity, $metadata[0], $forceOverwrite);
      }
docs: Tries to generate forms if they don't exist yet and if we need write operations on entities.