Sometimes, you may need to transmit some parameters from your generated controller to your generated view. You can simply do it by overriding the protected getAdditionalRenderParameters function into your bundle. Depending on controller type, prototype is different:
In the list controllers (ListController
and NestedListController
) the prototype is:
protected function getAdditionalRenderParameters(); // No parameters
In the edit, show and new controllers (EditController
, ShowController
and NewController
) the prototype is:
protected function getAdditionalRenderParameters(\Full\Path\To\Your\Object $Object);
This function must return an array. By default, it returns an empty array.
Note: this function is not available in
DeleteController
because it always returns aRedirectResponse
.