Add stop_on_condition process plugin

Created on 12 January 2024, 11 months ago
Updated 25 February 2024, 9 months ago

Problem/Motivation

Following ✨ Allow process plugins to stop further processing on a pipeline RTBC we have a really cool possibility for a new process plugin: stop_on_condition!

Proposed resolution

Let's add it along with test coverage.

It would look more-or-less like this:

/**
 * @MigrateProcessPlugin(
 *   id = "stop_on_condition",
 *   handle_multiples = TRUE
 * )
 */
class StopOnCondition extends ProcessPluginWithConditionBase {

  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
    if ($this->condition->evaluate($value, $row)) {
      $this->stopPipeline();
    }
    return $value;
  }

}

We should put this in a new minor release that has a version constraint ^10.3 since that's the release the new feature is added to.

User interface changes

nope

API changes

New plugin

Data model changes

nope

✨ Feature request
Status

Fixed

Version

2.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States danflanagan8 St. Louis, US

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024