Filter problem

I’m facing the same problem with all the filters that I define by myself, even with rbac extensions.

I’m getting this error for example for the :

Filter "application.modules.rbac.components.RbacAccessControl" is invalid. Controller "PostController" does have the filter method "filterapplication.modules.rbac.components.RbacAccessControl".

I’ hope that I’ll get a fast reply plz:S

I’m getting the same error when rbac filter is defined as inline filter in the PostController:




public function filters()

{

	return array(

		'rbac.components.RbacAccessControl',

	);

}



Try this configuration:




public function filters()

{

	return array(

		// 'accessControl', // controller must have a method filterAccessControl, see yii.web.CController

		array('rbac.components.RbacAccessControl'),

	);

}



Or you can write wrapper of RbacAccessControl in your (base)controller:




public function filterRbac($filterChain)

{

	Yii::import('rbac.components.RbacAccessControl');

	$filter = new RbacAccessControl;

	$filter->filter($filterChain);

}



then you can define filter as:




public function filters()

{

	return array(

		'rbac',

	);

}