migrate_skip_all_rows_test.module

Same filename and directory in other branches
  1. 10 core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module
  2. 11.x core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module

Tests the migration source plugin prepareRow() exception.

File

core/modules/migrate/tests/modules/migrate_skip_all_rows_test/migrate_skip_all_rows_test.module

View source
<?php


/**
 * @file
 * Tests the migration source plugin prepareRow() exception.
 */
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

Title Deprecated Summary
migrate_skip_all_rows_test_migrate_prepare_row Implements hook_migrate_prepare_row().

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