I have the following app_controller in app/controller.
the test function is never executed. If I put in the subclassed controller, its not executed there either. am I doing something wrong?
class AppController extends Controller {
var $beforeFilter = array('test');
function test() {
var_dump('test');
die();
}
}
beforeFilter should be the actual function, not a variable (like helpers or components)..
Too, in your controllers you should call
in their beforeFilter function. Since this is a static function, it need be an actual function 🙂