function LazyPluginCollection::getIterator
Return value
\Traversable<string, mixed> A traversable generator.
File
- 
              core/lib/ Drupal/ Component/ Plugin/ LazyPluginCollection.php, line 149 
Class
- LazyPluginCollection
- Defines an object which stores multiple plugin instances to lazy load them.
Namespace
Drupal\Component\PluginCode
public function getIterator() : \Traversable {
  $instances = [];
  foreach ($this->getInstanceIds() as $instance_id) {
    $instances[$instance_id] = $this->get($instance_id);
  }
  return new \ArrayIterator($instances);
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
