You are here

function migrate_skip_all_rows_test_migrate_prepare_row in Drupal 9

Same name and namespace in other branches
  1. 10 core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module \migrate_skip_all_rows_test_migrate_prepare_row()

Implements hook_migrate_prepare_row().

1 string reference to 'migrate_skip_all_rows_test_migrate_prepare_row'
MigrateSourceTestBase::testSource in core/modules/migrate/tests/src/Kernel/MigrateSourceTestBase.php
Tests the source plugin against a particular data set.

File

core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module, line 17
Test module for testing the migration source plugin prepareRow() exception handling.

Code

function migrate_skip_all_rows_test_migrate_prepare_row(Row $row, MigrateSourceInterface $source, MigrationInterface $migration) {
  if (\Drupal::state()
    ->get('migrate_skip_all_rows_test_migrate_prepare_row')) {
    throw new MigrateSkipRowException();
  }
}