You are here

class DrupalCaster in VarDumper 8

Class DrupalCaster.

Hierarchy

Expanded class hierarchy of DrupalCaster

File

src/Caster/DrupalCaster.php, line 11

Namespace

Drupal\vardumper\Caster
View 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