When I use Symfony, I name my views with the name of the corresponding action, so that I can use a @Template annotation without any parameters to render the view.
/**
* @Route("/{id}/show", name="entity_show")
* @Template()
*/
public function showAction($id) {
}
Does this only work with Twig? Is there a way to not having to specify the name of the view as a parameter for @Template when I use PHP views?
In addition to what Patt wrote, you must specifiy the engine for each use of the annotation: