You are here

protected function ContentEntity::initializeIterator in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntity::initializeIterator()

Initializes the iterator with the source data.

Return value

\Generator A data generator for this source.

Overrides SourcePluginBase::initializeIterator

File

core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntity.php, line 167

Class

ContentEntity
Source plugin to get content entities from the current version of Drupal.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

protected function initializeIterator() {
  $ids = $this
    ->query()
    ->execute();
  return $this
    ->yieldEntities($ids);
}