public static function Caster::castConfigEntity

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

Casts \Drupal\Core\Config\Entity\ConfigEntityInterface classes.

File

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

Namespace

Drush\Psysh

Class

Caster
Caster class for VarDumper casters for the shell.

Code

public static function castConfigEntity($entity, $array, $stub, $isNested) {
  if (!$isNested) {
    foreach ($entity->toArray() as $property => $value) {
      $array[BaseCaster::PREFIX_PROTECTED . $property] = $value;
    }
  }

  return $array;
}