migrate_skip_all_rows_test.module in Drupal 10
Same filename and directory in other branches
Test module for testing the migration source plugin prepareRow() exception handling.
File
core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.moduleView source
<?php
/**
* @file
* Test module for testing the migration source plugin prepareRow() exception
* handling.
*/
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\MigrateSkipRowException;
use Drupal\migrate\Plugin\MigrateSourceInterface;
use Drupal\migrate\Row;
/**
* Implements hook_migrate_prepare_row().
*/
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();
}
}
Functions
Name![]() |
Description |
---|---|
migrate_skip_all_rows_test_migrate_prepare_row | Implements hook_migrate_prepare_row(). |