Expected argument of type "string, Symfony\Component\Form\ResolvedFormTypeInterface or Symfony\Component\Form\FormTypeInterface", "array" given
Kod ponizej:
Klasa formularza: // TestType.php
{ $builder 'type' => new TestType() ) ); }
kontroler:
public function newAction(){ $repository = $this->getDoctrine()->getRepository('CostamBundle:Test'); $test = $repository->getMyFiveRecords(); // moja funkcja pobierajca 5 rekordow z bazy danych $form = $this->createForm($test,new TestType()); 'form' => $form->createView(), ); }
Twig:
Co robie w tym przykladzie zle ?