Reputation: 1696
I have some credential requirements for my modules in security.yml. How can i run a method before this checking is done? Is there any events for doing this?
Upvotes: 1
Views: 201
Reputation: 18706
Filters might be what you need.
Filters are run first every time your application runs.
Just add a filter in the apps/(front|back)end/config/filters.yml file:
myFilter:
class: myFilter
And create the class in lib/:
class myFilter extends sfFilter
{
public function execute($filterChain)
{
// write your code here...
// execute the next filter
$filterChain->execute();
}
}
Upvotes: 5