Skip to content
Snippets Groups Projects
Commit b3a88435 authored by git's avatar git Committed by Lucas Hedding
Browse files

Issue #3010390 by ressa, heddn: Multiple values with String Replace plugin example

parent 87ae3d84
No related branches found
No related tags found
No related merge requests found
...@@ -59,6 +59,15 @@ use Drupal\migrate\Row; ...@@ -59,6 +59,15 @@ use Drupal\migrate\Row;
* All the rules for * All the rules for
* @link http://php.net/manual/function.str-replace.php str_replace @endlink * @link http://php.net/manual/function.str-replace.php str_replace @endlink
* apply. This means that you can provide arrays as values. * apply. This means that you can provide arrays as values.
*
* Multiple values can be matched like this:
* @code
* field_text:
* plugin: str_replace
* source: text
* search: ["AT", "CH", "DK"]
* replace: ["Austria", "Switzerland", "Denmark"]
* @endcode
*/ */
class StrReplace extends ProcessPluginBase { class StrReplace extends ProcessPluginBase {
......
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