You are here

public function MigrateExecutable::onPreRowSave in Migrate Tools 8.2

Same name and namespace in other branches
  1. 8.5 src/MigrateExecutable.php \Drupal\migrate_tools\MigrateExecutable::onPreRowSave()
  2. 8 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 302

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;
  }
}