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

Breadcrumb

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

function MigrateDestinationInterface::import

Import the row.

Derived classes must implement import(), to construct one new object (pre-populated) using ID mappings in the Migration.

Parameters

\Drupal\migrate\Row $row: The row object.

array $old_destination_id_values: (optional) The destination IDs from the previous import of this source row. This is empty the first time a source row is migrated. Defaults to an empty array.

Return value

array|bool An indexed array of destination IDs in the same order as defined in the plugin's getIds() method if the plugin wants to save the IDs to the ID map, TRUE to indicate success without saving IDs to the ID map, or FALSE to indicate a failure.

Throws

\Drupal\migrate\MigrateException Throws an exception if there is a problem importing the row. By default, this causes the migration system to treat this row as having failed; however, any \Drupal\migrate\Plugin\MigrateIdMapInterface status constant can be set using the $status parameter of \Drupal\migrate\MigrateException, such as \Drupal\migrate\Plugin\MigrateIdMapInterface::STATUS_IGNORED.

9 methods override MigrateDestinationInterface::import()
BlockedIp::import in core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
Import the row.
ComponentEntityDisplayBase::import in core/modules/migrate/src/Plugin/migrate/destination/ComponentEntityDisplayBase.php
Import the row.
Config::import in core/modules/migrate/src/Plugin/migrate/destination/Config.php
Import the row.
EntityConfigBase::import in core/modules/migrate/src/Plugin/migrate/destination/EntityConfigBase.php
Import the row.
EntityContentBase::import in core/modules/migrate/src/Plugin/migrate/destination/EntityContentBase.php

... See full list

File

core/modules/migrate/src/Plugin/MigrateDestinationInterface.php, line 119

Class

MigrateDestinationInterface
Defines an interface for Migration Destination classes.

Namespace

Drupal\migrate\Plugin

Code

public function import(Row $row, array $old_destination_id_values = []);
RSS feed
Powered by Drupal