I have a controller in a Symfony 2.1 application, let\'s just call it FooController in the BarBundle. This controller has a lot of actions fooAct
FooController
BarBundle
fooAct
One of options
public function commonAction($type) { // ... return $this->render('BarBundle:Foo:'.$type.'.html.twig', array('data' => $this->getTheDataThatIsNeededInEveryAction())); }
where $type would be bar, foo or baz
$type