class DrupalCaster in VarDumper 8
Class DrupalCaster.
Hierarchy
- class \Drupal\vardumper\Caster\DrupalCasterBase
- class \Drupal\vardumper\Caster\DrupalCaster
Expanded class hierarchy of DrupalCaster
File
- src/
Caster/ DrupalCaster.php, line 11
Namespace
Drupal\vardumper\CasterView source
class DrupalCaster extends DrupalCasterBase {
/**
* @param $object
* @param array $array
* @param \Symfony\Component\VarDumper\Cloner\Stub $stub
* @param $isNested
*
* @return array
*/
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DrupalCaster:: |
public static | function | ||
DrupalCasterBase:: |
protected static | function |