function Sql::sourceIdFields
Same name in other branches
- 8.9.x core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::sourceIdFields()
- 10 core/modules/migrate/src/Plugin/migrate/id_map/Sql.php \Drupal\migrate\Plugin\migrate\id_map\Sql::sourceIdFields()
- 11.x 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.
10 calls to Sql::sourceIdFields()
- Sql::currentSource in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Looks up the source identifier(s) currently being iterated.
- Sql::getMessages in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Retrieves a traversable object of messages related to source records.
- Sql::getSourceIdsHash in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Retrieves the hash of the source identifier values.
- Sql::lookupDestinationIds in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Looks up the destination identifiers corresponding to a source key.
- Sql::lookupSourceId in core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php - Looks up the source identifier.
File
-
core/
modules/ migrate/ src/ Plugin/ migrate/ id_map/ Sql.php, line 245
Class
- Sql
- Defines the sql based ID map implementation.
Namespace
Drupal\migrate\Plugin\migrate\id_mapCode
protected function sourceIdFields() {
if (!isset($this->sourceIdFields)) {
// Build the source and destination identifier maps.
$this->sourceIdFields = [];
$count = 1;
foreach ($this->migration
->getSourcePlugin()
->getIds() as $field => $schema) {
$this->sourceIdFields[$field] = 'sourceid' . $count++;
}
}
return $this->sourceIdFields;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.