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();
    }
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();
    }
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 ( ) ; }
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
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 .