You are here

public function ConfigEntityAdapter::getIterator in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php \Drupal\Core\Entity\Plugin\DataType\ConfigEntityAdapter::getIterator()

Overrides EntityAdapter::getIterator

File

core/lib/Drupal/Core/Entity/Plugin/DataType/ConfigEntityAdapter.php, line 72

Class

ConfigEntityAdapter
Enhances EntityAdapter for config entities.

Namespace

Drupal\Core\Entity\Plugin\DataType

Code

public function getIterator() {
  if (isset($this->entity)) {
    return $this
      ->getConfigTypedData()
      ->getIterator();
  }
  return new \ArrayIterator([]);
}