diff --git a/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php b/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php index c7d3ad5..fdc73fe 100644 --- a/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php +++ b/core/modules/migrate/src/Plugin/migrate/process/SkipOnEmpty.php @@ -18,12 +18,18 @@ * * Available configuration keys: * - method: (optional) What to do if the input value is empty. Possible values: - * - row: Skips the entire row when an empty value is encountered. + * - row: Skips the entire row when an empty value is encountered. This is + * useful when combined with a migration_lookup process plugin to check if a + * related item was previously migrated. * - process: Prevents further processing of the input property when the value - * is empty. + * is empty. This is useful when migrating parent values. An empty or 0 + * value means that the current element is the root element and there is no + * set a parent destination value. Otherwise the current element is not the + * root element and parent can be mapped with the migration_lookup process + * plugin. * - message: (optional) A message to be logged in the {migrate_message_*} table - * for this row. Messages are only logged for the 'row' skip level. If not - * set, nothing is logged in the message table. + * for this row. Messages are only logged for the 'row' method. If not set, + * nothing is logged in the message table. * * Examples: * @@ -33,11 +39,10 @@ * plugin: skip_on_empty * method: row * source: field_name - * message: 'Field field_name is missed' + * message: 'Field field_name is missing' * @endcode - * - * If field_name is empty, skips the entire row and the message 'Field - * field_name is missed' is logged in the message table. + * If field_name is empty, the entire row is skipped and the message 'Field + * field_name is missing' is logged in the message table. * * @code * process: @@ -47,12 +52,11 @@ * method: process * source: parent * - - * plugin: migration + * plugin: migration_lookup * migration: d6_taxonomy_term * @endcode - * - * If parent is empty, any further processing of the property is skipped - thus, - * the next plugin (migration) will not be run. + * If parent is empty, any further processing of the property is skipped and the + * the next process plugin (migration_lookup) will not be run. * * @see \Drupal\migrate\Plugin\MigrateProcessInterface *