Skip to content
Snippets Groups Projects
Commit 24a4d4b6 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2845492 by quietone, FJ7, phenaproxima: Add documentation to SkipRowifNotSet process plugin

parent b078363c
No related branches found
No related tags found
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
......@@ -8,9 +8,30 @@
use Drupal\migrate\MigrateSkipRowException;
/**
* If the source evaluates to empty, we skip the current row.
* Skips processing the current row when a source value is not set.
*
* @link https://www.drupal.org/node/2345935 Online handbook documentation for skip_row_if_not_set process plugin @endlink
* The skip_row_if_not_set process plugin checks whether a value is set. If the
* value is set, it is returned. Otherwise, a MigrateSkipRowException
* is thrown.
*
* Available configuration keys:
* - index: The source property to check for.
*
* Example:
*
* @code
* process:
* settings:
* # Check if the "contact" key exists in the "data" array.
* plugin: skip_row_if_not_set
* index: contact
* source: data
* @endcode
*
* This will return $data['contact'] if it exists. Otherwise, the row will be
* skipped.
*
* @see \Drupal\migrate\Plugin\MigrateProcessInterface
*
* @MigrateProcessPlugin(
* id = "skip_row_if_not_set",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment