Ejemplo n.º 1
0
 /**
  * Builds a Symfony form from the passed Form entity and returns the related FormView,
  * so we can use our Form as a standard Symfony form in our templates.
  *
  * @param FormInterface $form
  *
  * @return \Symfony\Component\Form\FormView
  */
 public function createFormView(FormInterface $form)
 {
     $post = $this->eavManager->initializeEntity($form->getSchema());
     $form = $this->formFactory->create(PostType::class, $post, ['form_id' => $form->getId()]);
     return $form->createView();
 }