public function newAction(Request $request)
{
$message = new Message();
$form = $this->createFormBuilder($message)
->add('body', 'text')
->add('save', 'submit')
->getForm();
$form->handleRequest($request);
return $this->render('AcmeReadingBundle:Default:new.html.twig', array(
'form' => $form->createView(),
));
}
Ve new.html.twig dosyası
{{ form(form) }}
Ben bu hatayı almaya devam geçerli:
An exception has been thrown during the rendering of a template ("The controller for URI "/_fragment" is not callable.") in AcmeReadingBundle:Default:show.html.twig at line 18.
Bu kodla denedim ve aynı sonucu alma im –
üzgünüm newAction yerine yeni olmalı – nifr
Denetleyicime kod örneğinde olduğu gibi newAction adı verilir. Ve ben AcmeReadingBundle: Default: Action –