function Sql::next
Same name in other branches
- 9 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::next()
- 10 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::next()
- 11.x core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::next()
Implementation of \Iterator::next().
This is called at the bottom of the loop implicitly, as well as explicitly from rewind().
1 call to Sql::next()
- Sql::rewind in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Implementation of \Iterator::rewind().
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php, line 946
Class
- Sql
- Defines the sql based ID map implementation.
Namespace
Drupal\migrate\Plugin\migrate\id_mapCode
public function next() {
$this->currentRow = $this->result
->fetchAssoc();
$this->currentKey = [];
if ($this->currentRow) {
foreach ($this->sourceIdFields() as $map_field) {
$this->currentKey[$map_field] = $this->currentRow[$map_field];
// Leave only destination fields.
unset($this->currentRow[$map_field]);
}
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.