mongodb\rbac\MongoDbManager 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

mongodb\rbac\MongoDbManager getUserIdsByRole()

getUserIdsByRole() public method Returns all user IDs assigned to the role specified. public array getUserIdsByRole ( $roleName )$roleName string return array Array of user ID strings

mongodb\rbac\MongoDbManager 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

mongodb\rbac\MongoDbManager 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.

mongodb\rbac\MongoDbManager 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.

mongodb\rbac\MongoDbManager 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.

mongodb\rbac\MongoDbManager 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.

mongodb\rbac\MongoDbManager 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.

mongodb\rbac\MongoDbManager 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.

mongodb\rbac\MongoDbManager getChildRoles()

getChildRoles() public method (available since version 2.1.2) 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