I have created a custom show action (inspection_results) and route inside my ContractAdminController.
class ContractAdmin extends Admin
{
protected function configureRoutes(RouteCollection $collection)
{
$collection
->remove('delete')
->remove('export')
;
$collection->add('inspection_results', $this->getRouterIdParameter().'/inspection_results');
}
}
Technically everything works fine so far!
The I recognized that my breadcrumb menu was missing the label for my Contract entity. Instead it was directely showing the menu label Ergebniszusammenstellung for my action:
I have created a custom
show
action (inspection_results
) and route inside myContractAdminController
.Technically everything works fine so far!
The I recognized that my breadcrumb menu was missing the label for my
Contract
entity. Instead it was directely showing the menu labelErgebniszusammenstellung
for my action:Looking at the
showAction
of theCRUDController
I add thesetSubject
method: https://github.com/sonata-project/SonataAdminBundle/blob/master/Controller/CRUDController.php#L843Now the label for my
Contract
entity appears:But as you can see now the label of the action
Ergebniszusammenstellung
is missing at the final position.Is there another variable I have to pass to the template?
Possibly related: