rbac\ManagerInterface createRole()

createRole() public abstract 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 abstract yii\rbac\Role createRole ( $name )$name string The role name return yii\rbac\Role The new Role object

rbac\ManagerInterface createPermission()

createPermission() public abstract 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 abstract yii\rbac\Permission createPermission ( $name )$name string The permission name return yii\rbac\Permission The new Permission object

rbac\ManagerInterface canAddChild()

canAddChild() public abstract method (available since version 2.0.8) Checks the possibility of adding a child to parent public abstract boolean canAddChild ( $parent, $child )$parent yii\rbac\Item The parent item $child yii\rbac\Item The child item to be added to the hierarchy return boolean Possibility of adding

rbac\ManagerInterface assign()

assign() public abstract method Assigns a role to a user. public abstract yii\rbac\Assignment assign ( $role, $userId )$role yii\rbac\Role $userId string|integer The user ID (see yii\web\User::$id) return yii\rbac\Assignment The role assignment information. throws Exception if the role has already been assigned to the user

rbac\ManagerInterface addChild()

addChild() public abstract method Adds an item as a child of another item. public abstract boolean addChild ( $parent, $child )$parent yii\rbac\Item $child yii\rbac\Item return boolean Whether the child successfully added throws yii\base\Exception if the parent-child relationship already exists or if a loop has been detected.

rbac\ManagerInterface add()

add() public abstract method Adds a role, permission or rule to the RBAC system. public abstract 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\Item $updatedAt

$updatedAt public property UNIX timestamp representing the item updating time public integer $updatedAt = null

rbac\Item $type

$type public property The type of the item. This should be either TYPE_ROLE or TYPE_PERMISSION. public integer $type = null

rbac\Item $ruleName

$ruleName public property Name of the rule associated with this item public string $ruleName = null

rbac\Item $name

$name public property The name of the item. This must be globally unique. public string $name = null