public function EntityCollection::getIterator in JSON:API 8
Returns an iterator for entities.
Return value
\ArrayIterator An \ArrayIterator instance
File
- src/
Resource/ EntityCollection.php, line 58
Class
- EntityCollection
- Wrapper to normalize collections with multiple entities.
Namespace
Drupal\jsonapi\ResourceCode
public function getIterator() {
return new \ArrayIterator($this->entities);
}