protected function Sql::sourceIdFields in Drupal 9
Same name and namespace in other branches
- 8 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 226
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;
}