public static function Caster::castFieldItemList

8.0.x Caster.php public static Caster::castFieldItemList($list_item, $array, $stub, $isNested)
master Caster.php public static Caster::castFieldItemList($list_item, $array, $stub, $isNested)

Casts \Drupal\Core\Field\FieldItemListInterface classes.

File

lib/Drush/Psysh/Caster.php, line 33
Contains \Drush\Psysh\Caster.

Namespace

Drush\Psysh

Class

Caster
Caster class for VarDumper casters for the shell.

Code

public static function castFieldItemList($list_item, $array, $stub, $isNested) {
  if (!$isNested) {
    foreach ($list_item as $delta => $item) {
      $array[BaseCaster::PREFIX_VIRTUAL . $delta] = $item;
    }
  }

  return $array;
}