public function SkipMapOnEmpty::row in farmOS 2.x
Skips the current row when value is not set.
Parameters
mixed $value: The input value.
\Drupal\migrate\MigrateExecutableInterface $migrate_executable: The migration in which this process is being executed.
\Drupal\migrate\Row $row: The row from the source to process.
string $destination_property: The destination property currently worked on. This is only used together with the $row above.
Return value
mixed The input value, $value, if it is not empty.
Throws
\Drupal\migrate\MigrateSkipRowException Thrown if the source property is not set and the row should be skipped, records with STATUS_IGNORED status in the map.
Overrides SkipOnEmpty::row
File
- modules/
core/ migrate/ src/ Plugin/ migrate/ process/ SkipMapOnEmpty.php, line 28
Class
- SkipMapOnEmpty
- Skips processing (and mapping) the current row when the input value is empty.
Namespace
Drupal\farm_migrate\Plugin\migrate\processCode
public function row($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
if (!$value) {
$message = !empty($this->configuration['message']) ? $this->configuration['message'] : '';
throw new MigrateSkipRowException($message, FALSE);
}
return $value;
}