You are here

protected function Migration::skipOnEmpty in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Plugin/migrate/process/Migration.php \Drupal\migrate\Plugin\migrate\process\Migration::skipOnEmpty()

Skip the migration process entirely if the value is FALSE.

Parameters

mixed $value: The incoming value to transform.

Throws

\Drupal\migrate\MigrateSkipProcessException

1 call to Migration::skipOnEmpty()
Migration::transform in core/modules/migrate/src/Plugin/migrate/process/Migration.php
Performs the associated process.

File

core/modules/migrate/src/Plugin/migrate/process/Migration.php, line 158
Contains \Drupal\migrate\Plugin\migrate\process\Migration.

Class

Migration
Calculates the value of a property based on a previous migration.

Namespace

Drupal\migrate\Plugin\migrate\process

Code

protected function skipOnEmpty($value) {
  if (!array_filter($value)) {
    throw new MigrateSkipProcessException();
  }
}