rbac\PhpManager getItem()

getItem() public method Returns the named auth item. public yii\rbac\Item getItem ( $name )$name string The auth item name. return yii\rbac\Item The auth item corresponding to the specified name. Null is returned if no such item.

rbac\PhpManager getInheritedPermissionsByUser()

getInheritedPermissionsByUser() protected method (available since version 2.0.7) Returns all permissions that the user inherits from the roles assigned to him. protected yii\rbac\Permission[] getInheritedPermissionsByUser ( $userId )$userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Permission[] All inherited permissions that the user has. The array is indexed by the permission names.

rbac\PhpManager getDirectPermissionsByUser()

getDirectPermissionsByUser() protected method (available since version 2.0.7) Returns all permissions that are directly assigned to user. protected yii\rbac\Permission[] getDirectPermissionsByUser ( $userId )$userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Permission[] All direct permissions that the user has. The array is indexed by the permission names.

rbac\PhpManager getChildRoles()

getChildRoles() public method Returns the roles that are adding to the role via addChild() by recursive. public yii\rbac\Role[] getChildRoles ( $roleName )$roleName string Name of parent Role. return yii\rbac\Role[] All roles directly adding to the role. The array is indexed by the role names. First element is a Role item that are getting by $roleName. throws yii\base\InvalidParamException if Role was not found that are getting by $roleName

rbac\PhpManager getChildrenRecursive()

getChildrenRecursive() protected method Recursively finds all children and grand children of the specified item. protected void getChildrenRecursive ( $name, &$result )$name string The name of the item whose children are to be looked for. $result array The children and grand children (in array keys)

rbac\PhpManager getChildren()

getChildren() public method Returns the child permissions and/or roles. public yii\rbac\Item[] getChildren ( $name )$name string The parent name return yii\rbac\Item[] The child permissions and/or roles

rbac\PhpManager getAssignments()

getAssignments() public method Returns all role assignment information for the specified user. public yii\rbac\Assignment[] getAssignments ( $userId )$userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Assignment[] The assignments indexed by role names. An empty array will be returned if there is no role assigned to the user.

rbac\PhpManager getAssignment()

getAssignment() public method Returns the assignment information regarding a role and a user. public null|yii\rbac\Assignment getAssignment ( $roleName, $userId )$roleName string The role name $userId string|integer The user ID (see yii\web\User::$id) return null|yii\rbac\Assignment The assignment information. Null is returned if the role is not assigned to the user.

rbac\PhpManager detectLoop()

detectLoop() protected method Checks whether there is a loop in the authorization item hierarchy. protected boolean detectLoop ( $parent, $child )$parent yii\rbac\Item Parent item $child yii\rbac\Item The child item that is to be added to the hierarchy return boolean Whether a loop exists

rbac\PhpManager checkAccessRecursive()

checkAccessRecursive() protected method Performs access check for the specified user. This method is internally called by checkAccess(). protected boolean checkAccessRecursive ( $user, $itemName, $params, $assignments )$user string|integer The user ID. This should can be either an integer or a string representing the unique identifier of a user. See yii\web\User::$id. $itemName string The name of the operation that need access check $params array Name-value pairs that would be pass