rbac\PhpManager checkAccess()

checkAccess() public method public void checkAccess ( $userId, $permissionName, $params = [] )$userId $permissionName $params

rbac\PhpManager canAddChild()

canAddChild() public method (available since version 2.0.8) Checks the possibility of adding a child to parent public boolean canAddChild ( $parent, $child )$parent yii\rbac\Item The parent item $child yii\rbac\Item The child item to be added to the hierarchy return boolean Possibility of adding

rbac\PhpManager assign()

assign() public method Assigns a role to a user. public yii\rbac\Assignment assign ( $role, $userId )$role yii\rbac\Role $userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Assignment The role assignment information. throws Exception if the role has already been assigned to the user

rbac\PhpManager addRule()

addRule() protected method Adds a rule to the RBAC system. protected boolean addRule ( $rule )$rule yii\rbac\Rule The rule to add return boolean Whether the rule is successfully added to the system throws Exception if data validation or saving fails (such as the name of the rule is not unique)

rbac\PhpManager addItem()

addItem() protected method Adds an auth item to the RBAC system. protected boolean addItem ( $item )$item yii\rbac\Item The item to add return boolean Whether the auth item is successfully added to the system throws Exception if data validation or saving fails (such as the name of the role or permission is not unique)

rbac\PhpManager addChild()

addChild() public method Adds an item as a child of another item. public boolean addChild ( $parent, $child )$parent yii\rbac\Item $child yii\rbac\Item return boolean Whether the child successfully added throws yii\base\Exception if the parent-child relationship already exists or if a loop has been detected.

rbac\PhpManager $rules

$rules protected read-only property public yii\rbac\Rule[] getRules ( )

rbac\PhpManager $ruleFile

$ruleFile public property The path of the PHP script that contains the authorization rules. This can be either a file path or a path alias to the file. Make sure this file is writable by the Web server process if the authorization needs to be changed online. See also: loadFromFile() saveToFile() public string $ruleFile = '@app/rbac/rules.php'

rbac\PhpManager $items

$items protected property protected yii\rbac\Item[] $items = []

rbac\PhpManager $itemFile

$itemFile public property The path of the PHP script that contains the authorization items. This can be either a file path or a path alias to the file. Make sure this file is writable by the Web server process if the authorization needs to be changed online. See also: loadFromFile() saveToFile() public string $itemFile = '@app/rbac/items.php'