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

Breadcrumb

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

function Sql::currentDestination

Overrides MigrateIdMapInterface::currentDestination

File

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

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

public function currentDestination() {
    if ($this->valid()) {
        $result = [];
        foreach ($this->destinationIdFields() as $destination_field_name => $id_map_field_name) {
            if (!is_null($this->currentRow[$id_map_field_name])) {
                $result[$destination_field_name] = $this->currentRow[$id_map_field_name];
            }
        }
        return $result;
    }
    else {
        return NULL;
    }
}

API Navigation

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