Same filename and directory in other branches
- 8.9.x core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php
- 9 core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php
Namespace
Drupal\migrate\Plugin\migrate\process
File
core/modules/migrate/src/Plugin/migrate/process/SkipRowIfNotSet.php
View source
<?php
namespace Drupal\migrate\Plugin\migrate\process;
use Drupal\migrate\ProcessPluginBase;
use Drupal\migrate\MigrateExecutableInterface;
use Drupal\migrate\Row;
use Drupal\migrate\MigrateSkipRowException;
class SkipRowIfNotSet extends ProcessPluginBase {
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (!isset($value[$this->configuration['index']])) {
$message = !empty($this->configuration['message']) ? $this->configuration['message'] : '';
throw new MigrateSkipRowException($message);
}
return $value[$this->configuration['index']];
}
}
Classes
Name |
Description |
SkipRowIfNotSet |
Skips processing the current row when a source value is not set. |