rbac\DbManager invalidateCache()

invalidateCache() public method public void invalidateCache ( )

rbac\DbManager init()

init() public method Initializes the application component. This method overrides the parent implementation by establishing the database connection. public void init ( )

rbac\DbManager hasChild()

hasChild() public method Returns a value indicating whether the child already exists for the parent. public boolean hasChild ( $parent, $child )$parent yii\rbac\Item $child yii\rbac\Item return boolean Whether $child is already a child of $parent

rbac\DbManager getUserIdsByRole()

getUserIdsByRole() public method (available since version 2.0.7) Returns all role assignment information for the specified role. public yii\rbac\Assignment[] getUserIdsByRole ( $roleName )$roleName string return yii\rbac\Assignment[] The assignments. An empty array will be returned if role is not assigned to any user.

rbac\DbManager getRules()

getRules() public method Returns all rules available in the system. public yii\rbac\Rule[] getRules ( )return yii\rbac\Rule[] The rules indexed by the rule names

rbac\DbManager getRule()

getRule() public method Returns the rule of the specified name. public null|yii\rbac\Rule getRule ( $name )$name string The rule name return null|yii\rbac\Rule The rule object, or null if the specified name does not correspond to a rule.

rbac\DbManager getRolesByUser()

getRolesByUser() public method Returns the roles that are assigned to the user via assign(). Note that child roles that are not assigned directly to the user will not be returned. public yii\rbac\Role[] getRolesByUser ( $userId )$userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Role[] All roles directly assigned to the user. The array is indexed by the role names.

rbac\DbManager getPermissionsByUser()

getPermissionsByUser() public method Returns all permissions that the user has. public yii\rbac\Permission[] getPermissionsByUser ( $userId )$userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Permission[] All permissions that the user has. The array is indexed by the permission names.

rbac\DbManager getPermissionsByRole()

getPermissionsByRole() public method Returns all permissions that the specified role represents. public yii\rbac\Permission[] getPermissionsByRole ( $roleName )$roleName string The role name return yii\rbac\Permission[] All permissions that the role represents. The array is indexed by the permission names.

rbac\DbManager getItems()

getItems() protected method Returns the items of the specified type. protected yii\rbac\Item[] getItems ( $type )$type integer The auth item type (either yii\rbac\Item::TYPE_ROLE or yii\rbac\Item::TYPE_PERMISSION return yii\rbac\Item[] The auth items of the specified type.