function Sql::getRowBySource

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

Overrides MigrateIdMapInterface::getRowBySource

File

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

Class

Sql
Defines the sql based ID map implementation.

Namespace

Drupal\migrate\Plugin\migrate\id_map

Code

public function getRowBySource(array $source_id_values) {
    $query = $this->getDatabase()
        ->select($this->mapTableName(), 'map')
        ->fields('map');
    $query->condition($this::SOURCE_IDS_HASH, $this->getSourceIdsHash($source_id_values));
    $result = $query->execute();
    return $result->fetchAssoc();
}

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