Skip to content
Snippets Groups Projects
Unverified Commit 45dee9bf authored by Alex Pott's avatar Alex Pott
Browse files

Issue #2941323 by quietone, joachim: StaticMap should document how/whether it...

Issue #2941323 by quietone, joachim: StaticMap should document how/whether it handles source values of NULL, TRUE, FALSE
parent 5cb4fa91
No related branches found
No related tags found
6 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!1012Issue #3226887: Hreflang on non-canonical content pages,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10,!596Issue #3046532: deleting an entity reference field, used in a contextual view, makes the whole site unrecoverable,!496Issue #2463967: Use .user.ini file for PHP settings,!16Draft: Resolve #2081585 "History storage"
......@@ -105,6 +105,34 @@
* 'TRUE': to
* @endcode
*
* A NULL can be mapped. If the value of the source property 'foo' is NULL then
* the value of the destination property bar will be 'to'.
*
* @code
* process:
* bar:
* plugin: static_map
* source: foo
* map:
* NULL: to
* @endcode
*
* If your source data contains booleans, the boolean is treated as a numeric 0
* or 1. If the value of the source property 'foo' is TRUE then the value of the
* destination property bar will be 'bar'. And if the value of the source
* property 'foo' is FALSE then the value of the destination property bar will
* be 'bar'.
*
* @code
* process:
* bar:
* plugin: static_map
* source: foo
* map:
* 0: foo
* 1: bar
* @endcode
*
* Mapping from a string which contains a period is not supported. A custom
* process plugin can be written to handle this kind of a transformation.
* Another option which may be feasible in certain use cases is to first pass
......
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