rbac\DbManager getItem()

getItem() protected method Returns the named auth item. protected 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\DbManager 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\DbManager 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\DbManager 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\DbManager getChildrenRecursive()

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

rbac\DbManager getChildrenList()

getChildrenList() protected method Returns the children for every parent. protected array getChildrenList ( )return array The children list. Each array key is a parent item name, and the corresponding array value is a list of child item names.

rbac\DbManager 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\DbManager 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\DbManager 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\DbManager detectLoop()

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