Same name and namespace in other branches
  1. 8.9.x core/modules/migrate/tests/modules/migrate_prepare_row_test/src/Plugin/migrate/process/TestSkipRowProcess.php \Drupal\migrate_prepare_row_test\Plugin\migrate\process\TestSkipRowProcess
  2. 9 core/modules/migrate/tests/modules/migrate_prepare_row_test/src/Plugin/migrate/process/TestSkipRowProcess.php \Drupal\migrate_prepare_row_test\Plugin\migrate\process\TestSkipRowProcess

Hierarchy

  • class \Drupal\migrate_prepare_row_test\Plugin\migrate\process\TestSkipRowProcess extends \Drupal\migrate\ProcessPluginBase

Expanded class hierarchy of TestSkipRowProcess

File

core/modules/migrate/tests/modules/migrate_prepare_row_test/src/Plugin/migrate/process/TestSkipRowProcess.php, line 15

Namespace

Drupal\migrate_prepare_row_test\Plugin\migrate\process
View source
class TestSkipRowProcess extends ProcessPluginBase {

  /**
   * {@inheritdoc}
   */
  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {

    // Test both options for save_to_map.
    $data = $row
      ->getSourceProperty('data');
    if ($data == 'skip_and_record (use plugin)') {
      throw new MigrateSkipRowException('', TRUE);
    }
    elseif ($data == 'skip_and_do_not_record (use plugin)') {
      throw new MigrateSkipRowException('', FALSE);
    }
    return $value;
  }

}

Members