Loading core/modules/migrate/src/Plugin/migrate/process/StaticMap.php +28 −0 Original line number Diff line number Diff line Loading @@ -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 Loading Loading
core/modules/migrate/src/Plugin/migrate/process/StaticMap.php +28 −0 Original line number Diff line number Diff line Loading @@ -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 Loading