function SqlBase::rewind

Rewinds the iterator.

Implementation of \Iterator::rewind() - subclasses of SourcePluginBase should implement initializeIterator() to do any class-specific setup for iterating source records.

Attributes

#[\ReturnTypeWillChange]

Overrides SourcePluginBase::rewind

File

core/modules/migrate/src/Plugin/migrate/source/SqlBase.php, line 382

Class

SqlBase
Sources whose data may be fetched via a database connection.

Namespace

Drupal\migrate\Plugin\migrate\source

Code

public function rewind() : void {
  $this->batch = 0;
  // Database queries have to be run again as they cannot be rewound.
  unset($this->iterator);
  parent::rewind();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.