Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- controller:
- public function filtes()
- {
- return array(
- 'accessControl',
- 'application.components.UserFilter',
- );
- }
- public function actionIndex()
- {
- var_dump($this->filters()); // empty array
- }
- UserFilter:
- class UserFilter extends CFilter
- {
- public function init()
- {
- echo "init test";
- }
- public function preFilter($filterChain)
- {
- echo "filter test";
- return true;
- }
- }
Add Comment
Please, Sign In to add comment