You are here

protected function Sql::destinationIdFields in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::destinationIdFields()

The destination ID fields.

Return value

array The destination ID fields.

9 calls to Sql::destinationIdFields()
Sql::currentDestination in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Looks up the destination identifier currently being iterated.
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::getHighestId in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Returns the highest ID tracked by the implementing plugin.
Sql::getMessages in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Retrieves a traversable object of messages related to source records.
Sql::getRowByDestination in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Retrieves a row by the destination identifiers.

... See full list

File

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

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

protected function destinationIdFields() {
  if (!isset($this->destinationIdFields)) {
    $this->destinationIdFields = [];
    $count = 1;
    foreach ($this->migration
      ->getDestinationPlugin()
      ->getIds() as $field => $schema) {
      $this->destinationIdFields[$field] = 'destid' . $count++;
    }
  }
  return $this->destinationIdFields;
}