Closed muratcelik27 closed 8 years ago
Please provide code you've created RBAC hierarchy with and code that you're calling to get the issue.
Thanks for posting in our issue tracker. In order to properly assist you, we need additional information:
Thanks!
This is an automated comment, triggered by adding the label status:need more info
.
@murat-celik
getChildRoles()
return yii\rbac\Role[]
All roles directly adding to the role. The array is indexed by the role names. First element is a Role item that are getting by $roleName.
So this is not a bug
@evgen-d is right.
1) I have one role.
2) Role name is "Sevko".
3) "Sevko" no have any Child Role.
4) Run getChildRoles("Sevko").
5) Return yii\rbac\Role[].
6) In this return exist also "Sevko" Role.
7) This is really true usage ?
@evgen-d @samdark
Well, at least it is what's implemented and what is described in phpdoc.
$id is my any role and want to get childRoles. But getChildRoles($id) return and my $id role.
Yii version : 2.0.10 PHP version : 5.6.12
Operating system : mac os x sierra