Just wondering if Symfony2 has an equivalent to before_filter from Rails? I want to alter the layout of my application based on the type of user that is viewing it. Thanks a lot.
EDIT: I should clarify my question. I want to alter the layout of my application based on a URL parameter. So ultimately all the before_filter equivalent has to do is make every template rendered by the controller inherit from a different base template based on that URL parameter. I should add I already have over 50 controller actions that render templates so ideally the solution should be something that is easy to enable application-wide without having to edit every controller action.