protected flattenRoles ( array $roles ) : string[] | ||
$roles | array | |
return | string[] |
protected function flattenRoles(array $roles)
{
$roleNames = [];
$iterator = $this->traversalStrategy->getRolesIterator($roles);
foreach ($iterator as $role) {
$roleNames[] = $role->getName();
}
return array_unique($roleNames);
}