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) |
Please login to continue.