You are here

protected function Sql::sourceIdFields in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 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.

11 calls to Sql::sourceIdFields()
Sql::delete in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Deletes the map and message entries for a given source record.
Sql::deleteDestination in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Deletes the map and message table entries for a given destination row.
Sql::getMessageIterator in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Retrieves an iterator over messages relate to source records.
Sql::getRowBySource in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Retrieves a row from the map table based on source identifier values.
Sql::lookupDestinationId in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Looks up the destination identifier corresponding to a source key.

... See full list

File

core/modules/migrate/src/Plugin/migrate/id_map/Sql.php, line 178
Contains \Drupal\migrate\Plugin\migrate\id_map\Sql.

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 = array();
    $count = 1;
    foreach ($this->migration
      ->getSourcePlugin()
      ->getIds() as $field => $schema) {
      $this->sourceIdFields[$field] = 'sourceid' . $count++;
    }
  }
  return $this->sourceIdFields;
}