To do this, we need the following:
/* ... */ use Yii; use yiirbacItem; /* ... */ $auth = Yii::$app -> authManager; $Item = new Item(); $Item -> type = 3; $Item -> name = 'ItemNewName' $Item -> description = 'ItemNewDescription'; $auth -> add($Item);
Where "$Item -> type" specifies a numeric value.
Don’t forget that values 1 and 2 are reserved for roles and permissions.
