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

Breadcrumb

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

function MigrateIdMapInterface::saveIdMapping

Saves a mapping from the source identifiers to the destination identifiers.

Called upon import of one row, we record a mapping from the source ID to the destination ID. Also may be called, setting the third parameter to NEEDS_UPDATE, to signal an existing record should be re-migrated.

Parameters

\Drupal\migrate\Row $row: The raw source data. We use the ID map derived from the source object to get the source identifier values.

array $destination_id_values: An array of destination identifier values.

int $status: (optional) Status of the source row in the map. Defaults to self::STATUS_IMPORTED.

int $rollback_action: (optional) How to handle the destination object on rollback. Defaults to self::ROLLBACK_DELETE.

2 methods override MigrateIdMapInterface::saveIdMapping()
NullIdMap::saveIdMapping in core/modules/migrate/src/Plugin/migrate/id_map/NullIdMap.php
Saves a mapping from the source identifiers to the destination identifiers.
Sql::saveIdMapping in core/modules/migrate/src/Plugin/migrate/id_map/Sql.php
Saves a mapping from the source identifiers to the destination identifiers.

File

core/modules/migrate/src/Plugin/MigrateIdMapInterface.php, line 89

Class

MigrateIdMapInterface
Defines an interface for migrate ID mappings.

Namespace

Drupal\migrate\Plugin

Code

public function saveIdMapping(Row $row, array $destination_id_values, $status = self::STATUS_IMPORTED, $rollback_action = self::ROLLBACK_DELETE);

API Navigation

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