rbac\BaseManager getItems()

getItems() protected abstract method Returns the items of the specified type. protected abstract 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\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 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 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 $defaultRoles

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

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 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 ( )