public static function DrupalCaster::castUser in VarDumper 8
Parameters
$object:
array $array:
\Symfony\Component\VarDumper\Cloner\Stub $stub:
$isNested:
Return value
array
File
- src/
Caster/ DrupalCaster.php, line 21
Class
- DrupalCaster
- Class DrupalCaster.
Namespace
Drupal\vardumper\CasterCode
public static function castUser($object, array $array, Stub $stub, $isNested) {
foreach ($object
->getRoles() as $key => $role) {
$array[Caster::PREFIX_PROTECTED . 'roles'][$key] = static::generateLink('/admin/people/permissions/' . $role, $role);
}
return $array;
}