Abhoryo/APYBreadcrumbTrailBundle — pull request #11 by notFloran (2013-11-28 12:38:32+00:00)
Title: Use paramConverter of SensioFrameworkExtraBundle in breadcrumb title

In our projects, we use a lot the paramConverter of SensioFrameworkExtraBundle and so the following syntax:

/**
*
* @Route("/{slug}", name="customer_show")
* @Method("GET")
*
* @Breadcrumb("Client", route="customer_index")
*/
public function showAction(Customer $customer)
{
$this->get("apy_breadcrumb_trail")->add($customer->__toString());

return array('entity' => $customer);
}

To show the following breadcrumb :
Client -> Floran

I modify the bundle to use this new syntax :

/**
*
* @Route("/{slug}", name="customer_show")
* @Method("GET")
*
* @Breadcrumb("Client", route="customer_index")
* @Breadcrumb("{customer}")
*/
public function showAction(Customer $customer)
{
return array('entity' => $customer);
}

What do you think of this change?