function MigrateEventsTest::preImportEventRecorder

Same name in other branches
  1. 9 core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php \Drupal\Tests\migrate\Kernel\MigrateEventsTest::preImportEventRecorder()
  2. 10 core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php \Drupal\Tests\migrate\Kernel\MigrateEventsTest::preImportEventRecorder()
  3. 11.x core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php \Drupal\Tests\migrate\Kernel\MigrateEventsTest::preImportEventRecorder()

Reacts to pre-import event.

Parameters

\Drupal\migrate\Event\MigrateImportEvent $event: The migration event.

string $name: The event name.

File

core/modules/migrate/tests/src/Kernel/MigrateEventsTest.php, line 162

Class

MigrateEventsTest
Tests events fired on migrations.

Namespace

Drupal\Tests\migrate\Kernel

Code

public function preImportEventRecorder(MigrateImportEvent $event, $name) {
    $this->state
        ->set('migrate_events_test.pre_import_event', [
        'event_name' => $name,
        'migration' => $event->getMigration(),
    ]);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.