rbac\PhpManager loadFromFile()

loadFromFile() protected method Loads the authorization data from a PHP script file. See also saveToFile(). protected array loadFromFile ( $file )$file string The file path. return array The authorization data

rbac\PhpManager getUserIdsByRole()

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

rbac\PhpManager 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\PhpManager init()

init() public method Initializes the application component. This method overrides parent implementation by loading the authorization data from PHP script. public void init ( )

rbac\PhpManager 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\PhpManager 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\PhpManager 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\PhpManager 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\PhpManager getItems()

getItems() public method Returns the items of the specified type. public 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.

rbac\PhpManager 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.