Problem/Motivation
It would be nice to have an ability to skip a row or process if a substr is found in an value.
The functionality should be nearly identical to https://git.drupalcode.org/project/migrate_plus/blob/HEAD/src/Plugin/mig...
* Example usage with full configuration:
* @code
* type:
* plugin: skip_on_substr
* not_equals: true
* source: content_type
* method: row
* case_sensitive: true <----this is the new setting
* value:
* - ABC
* - Abj
* @endcode
* The above example will skip processing any row for which the source row's
* content type field does not contain "ABC" or "Abj".
* 10562WABS would be skipped.
* 555424DABC would be migrated
* 555424Dabc would be skipped
* 344555jAbj would be migrated
The $this->configuration['case_sensitive'] would result in the difference between strpos and stripos. Caution: with php 7.3^ these functions no longer accept integers, so be sure to cast any value passed in to a string. However do not return the cast version so we are not altering the data down the rest of the pipeline.
Comments
Comment #4
swirtThis was just merged and will go out with the next release. Thank you Kaise for your contribution.
Comment #5
swirt