You are here

public function MigrateExecutable::onPreRowSave in Migrate Tools 8

Same name and namespace in other branches
  1. 8.5 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPreRowSave()
  2. 8.2 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPreRowSave()
  3. 8.3 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPreRowSave()
  4. 8.4 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPreRowSave()

React to an item about to be imported.

Parameters

\Drupal\migrate\Event\MigratePreRowSaveEvent $event: The pre-save event.

File

src/MigrateExecutable.php, line 295
Contains \Drupal\migrate_tools\MigrateExecutable.

Class

MigrateExecutable

Namespace

Drupal\migrate_tools

Code

public function onPreRowSave(MigratePreRowSaveEvent $event) {
  $id_map = $event
    ->getRow()
    ->getIdMap();
  if (!empty($id_map['destid1'])) {
    $this->preExistingItem = TRUE;
  }
  else {
    $this->preExistingItem = FALSE;
  }
}