Is there a way, for example, beforeAction for Symfony 2 controllers? Also, is there a common beforeAction for the whole package / project?
beforeAction
No, unfortunately, symfony2 does not have the equivalent of preExecute , but instead you have access to a more powerful event model.
preExecute
This article explains how to add a listener.
The event you want to listen to is onCoreController
onCoreController
See also: http://symfony.com/doc/2.0/book/internals.html#the-event-dispatcher
Source: https://habr.com/ru/post/1392001/More articles:Link to this in actionPerformed - javaUnix output connectors on the same line - unixsp_generate_inserts for SQL Server 2008 - sql-serverWhy does firebug show some javascript objects in red? - javascriptASP.NET MVC3 AOP proxy controller does not intercept all methods, only IController.Execute - c #Entity Framework Properties Interface Type - .netHow to build the next visual - designMVC project architecture supporting modules - module-Dorg.apache.el.parser.COERCE_TO_ZERO for glass fish? - jsfHow to set maximum pool size in MDB on weblogic 10.3 - weblogic-10.xAll Articles