Commit 24a4d4b6 authored by alexpott's avatar alexpott

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

parent b078363c
......@@ -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",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment