function Sql::destinationIdFields

Same name in other branches
  1. 9 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::destinationIdFields()
  2. 8.9.x core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::destinationIdFields()
  3. 11.x 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
Sql::deleteDestination in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Sql::getHighestId 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::getRowByDestination 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 264

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;
}

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