You are here

public function UserData::import in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/user/src/Plugin/migrate/destination/UserData.php \Drupal\user\Plugin\migrate\destination\UserData::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: The old destination ids.

Return value

mixed The entity id or an indication of success.

Overrides MigrateDestinationInterface::import

File

core/modules/user/src/Plugin/migrate/destination/UserData.php, line 64
Contains \Drupal\user\Plugin\migrate\destination\UserData.

Class

UserData
Plugin annotation @MigrateDestination( id = "user_data" )

Namespace

Drupal\user\Plugin\migrate\destination

Code

public function import(Row $row, array $old_destination_id_values = array()) {
  $uid = $row
    ->getDestinationProperty('uid');
  $module = $row
    ->getDestinationProperty('module');
  $key = $row
    ->getDestinationProperty('key');
  $this->userData
    ->set($module, $uid, $key, $row
    ->getDestinationProperty('settings'));
  return [
    $uid,
    $module,
    $key,
  ];
}