function Sql::sourceIdFields

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::sourceIdFields()
  2. 8.9.x core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::sourceIdFields()
  3. 10 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::sourceIdFields()

The source ID fields.

Return value

array The source ID fields.

10 calls to Sql::sourceIdFields()
Sql::currentSource in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Sql::getMessages in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Sql::getSourceIdsHash in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Retrieves the hash of the source identifier values.
Sql::lookupDestinationIds in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Sql::lookupSourceId in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php

... See full list

File

core/modules/migrate/src/Plugin/migrate/id_map/Sql.php, line 241

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

protected function sourceIdFields() {
    if (!isset($this->sourceIdFields)) {
        // Build the source and destination identifier maps.
        $this->sourceIdFields = [];
        $count = 1;
        foreach ($this->migration
            ->getSourcePlugin()
            ->getIds() as $field => $schema) {
            $this->sourceIdFields[$field] = 'sourceid' . $count++;
        }
    }
    return $this->sourceIdFields;
}

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