Свойство | Type | Description | |
---|---|---|---|
$denyCallback | a callback that will be called if the access should be denied to the current user. If not set, AccessControl::denyAccess will be called. The signature of the callback should be as follows: php function ($rule, $action) where $rule is the rule that denies the user, and $action is the current [[Action|action]] object. $rule can be null if access is denied because none of the rules matched. | ||
$ruleConfig | the default configuration of access rules. Individual rule configurations specified via [[rules]] will take precedence when the same property of the rule is configured. | ||
$rules | a list of access rule objects or configuration arrays for creating the rule objects. If a rule is specified via a configuration array, it will be merged with [[ruleConfig]] first before it is used for creating the rule object. | ||
$user | the user object representing the authentication status or the ID of the user application component. Starting from version 2.0.2, this can also be a configuration array for creating the object. |
Méthode | Description | |
---|---|---|
beforeAction ( |
This method is invoked right before an action is to be executed (after all possible filters.) You may override this method to do last-minute preparation for the action. | |
init ( ) | Initializes the [[rules]] array by instantiating rule objects from configurations. |
Méthode | Description | |
---|---|---|
denyAccess ( |
Denies the access of the user. |
public beforeAction ( |
||
$action | the action to be executed. | |
Résultat | boolean | whether the action should continue to be executed. |
protected denyAccess ( |
||
$user | the current user |
public init ( ) |
public $denyCallback |
public $ruleConfig |
public $rules |