rbac\BaseManager getItem()

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

executeRule() protected method Executes the rule associated with the specified auth item. If the item does not specify a rule, this method will return true. Otherwise, it will return the value of yii\rbac\Rule::execute(). protected boolean executeRule ( $user, $item, $params )$user string|integer The user ID. This should be either an integer or a string representing the unique identifier of a user. See yii\web\User::$id. $item yii\rbac\Item The auth item that needs to execute its rul

rbac\BaseManager createRole()

createRole() public method Creates a new Role object. Note that the newly created role is not added to the RBAC system yet. You must fill in the needed data and call add() to add it to the system. public yii\rbac\Role createRole ( $name )$name string The role name return yii\rbac\Role The new Role object

rbac\BaseManager createPermission()

createPermission() public method Creates a new Permission object. Note that the newly created permission is not added to the RBAC system yet. You must fill in the needed data and call add() to add it to the system. public yii\rbac\Permission createPermission ( $name )$name string The permission name return yii\rbac\Permission The new Permission object

rbac\BaseManager addRule()

addRule() protected abstract method Adds a rule to the RBAC system. protected abstract boolean addRule ( $rule )$rule yii\rbac\Rule The rule to add return boolean Whether the rule is successfully added to the system throws Exception if data validation or saving fails (such as the name of the rule is not unique)

rbac\BaseManager addItem()

addItem() protected abstract method Adds an auth item to the RBAC system. protected abstract boolean addItem ( $item )$item yii\rbac\Item The item to add return boolean Whether the auth item is successfully added to the system throws Exception if data validation or saving fails (such as the name of the role or permission is not unique)

rbac\BaseManager add()

add() public method Adds a role, permission or rule to the RBAC system. public boolean add ( $object )$object yii\rbac\Role|yii\rbac\Permission|yii\rbac\Rule return boolean Whether the role, permission or rule is successfully added to the system throws Exception if data validation or saving fails (such as the name of the role or permission is not unique)

rbac\BaseManager $roles

$roles public read-only property All roles in the system. The array is indexed by the role names. public yii\rbac\Role[] getRoles ( )

rbac\BaseManager $permissions

$permissions public read-only property All permissions in the system. The array is indexed by the permission names. public yii\rbac\Permission[] getPermissions ( )

rbac\BaseManager $defaultRoles

$defaultRoles public property A list of role names that are assigned to every user automatically without calling assign(). public array $defaultRoles = []