Formulario:
Código PHP:
<ul class="newEntry">
<li>
<a class="btn" href="{{ path('admin_jewels_new') }}">
Crear una nueva joya
</a>
</li>
</ul>
Código PHP:
/**
* Displays a form to create a new Jewels entity.
*
* @Route("/new", name="admin_jewels_new")
* @Method("GET")
* @Template()
*/
public function newAction()
{
$entity = new Jewels();
$form = $this->createForm(new JewelsType(), $entity);
return array(
'entity' => $entity,
'form' => $form->createView(),
'jewelsActive' => true
);
}