rbac\BaseManager updateRule()

updateRule() protected abstract method Updates a rule to the RBAC system. protected abstract boolean updateRule ( $name, $rule )$name string The name of the rule being updated $rule yii\rbac\Rule The updated rule return boolean Whether the rule is successfully updated throws Exception if data validation or saving fails (such as the name of the rule is not unique)

rbac\BaseManager update()

update() public method Updates the specified role, permission or rule in the system. public boolean update ( $name, $object )$name string The old name of the role, permission or rule $object yii\rbac\Role|yii\rbac\Permission|yii\rbac\Rule return boolean Whether the update is successful throws Exception if data validation or saving fails (such as the name of the role or permission is not unique)

rbac\BaseManager removeRule()

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

rbac\BaseManager removeItem()

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

rbac\BaseManager remove()

remove() public method Removes a role, permission or rule from the RBAC system. public boolean remove ( $object )$object yii\rbac\Role|yii\rbac\Permission|yii\rbac\Rule return boolean Whether the role, permission or rule is successfully removed

rbac\BaseManager getPermissions()

getPermissions() public method Returns all permissions in the system. public yii\rbac\Permission[] getPermissions ( )return yii\rbac\Permission[] All permissions in the system. The array is indexed by the permission names.

rbac\BaseManager getPermission()

getPermission() public method Returns the named permission. public null|yii\rbac\Permission getPermission ( $name )$name string The permission name. return null|yii\rbac\Permission The permission corresponding to the specified name. Null is returned if no such permission.

rbac\BaseManager getRoles()

getRoles() public method Returns all roles in the system. public yii\rbac\Role[] getRoles ( )return yii\rbac\Role[] All roles in the system. The array is indexed by the role names.

rbac\BaseManager getRole()

getRole() public method Returns the named role. public null|yii\rbac\Role getRole ( $name )$name string The role name. return null|yii\rbac\Role The role corresponding to the specified name. Null is returned if no such role.

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