public function getChildRoles($roleName)
{
$role = $this->getRole($roleName);
if (is_null($role)) {
throw new InvalidParamException("Role \"{$roleName}\" not found.");
}
$result = [];
$this->getChildrenRecursive($roleName, $this->getChildrenList(), $result);
$roles = [$roleName => $role];
$roles += array_filter($this->getRoles(), function (Role $roleItem) use($result) {
return array_key_exists($roleItem->name, $result);
});
return $roles;
}