tags:

views:

86

answers:

2

I have code that I want to be executed before every action is called. Are there action hooks I can use for this?

+3  A: 

In a module:

public function preExecute()
{

}

If you want it to be global for all modules, put it in the appConfiguration class, or create a filter.

Coronatus
I put it in my backendConfiguraiton class, but it didn't execute. I'm using v1.4.3-DEV if that makes a difference. Thanks.
jeremib
it looks like filters may be the way to go. Thanks for the direction.
jeremib
A: 

+1 for filters. events can also be very useful, depending on what you want to do.

Darragh
I would -1, but you are new. Comments go underneath answers, so that questions aren't bumped to the top. :) Edit: maybe you need some reputation points to write comments.
Coronatus
@Coronatus. duly noted. thanks. yes, I'm new :) there wasn't an 'add comment' for the previous answer; I didn't realise my post would register as a wholly different answer. something new learned every day...
Darragh