Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. Sql.php

function 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 987

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

public function next() : void {
    $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]);
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal