From 9b0a971a8e58a27bd6e33f16788617f7b9200a94 Mon Sep 17 00:00:00 2001 From: Alex Pott Date: Mon, 28 Sep 2020 12:31:10 +0100 Subject: [PATCH] Issue #2949400 by ayushmishra206, chandrashekhar_srijan, bandanasharma, marvil07, AkashkumarOSL, quietone, mikelutz: MigrateProcessInterface documents ProcessPluginBase behaviour (cherry picked from commit a677705b3be5e3659b5d99682f830f1aa4f6065c) --- .../migrate/src/Plugin/MigrateProcessInterface.php | 13 +++---------- core/modules/migrate/src/ProcessPluginBase.php | 8 ++++++++ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/core/modules/migrate/src/Plugin/MigrateProcessInterface.php b/core/modules/migrate/src/Plugin/MigrateProcessInterface.php index 8fef305f74..09ff01e48a 100644 --- a/core/modules/migrate/src/Plugin/MigrateProcessInterface.php +++ b/core/modules/migrate/src/Plugin/MigrateProcessInterface.php @@ -9,16 +9,9 @@ /** * An interface for migrate process plugins. * - * A process plugin will typically implement the transform() method to perform - * its work. However, it is possible instead for a process plugin to use any - * number of methods, thus offering different alternatives ways of processing. - * In this case, the transform() method should not be implemented, and the - * plugin configuration must provide the name of the method to be called via the - * "method" key. Each method must have the same signature as transform(). - * The base class \Drupal\migrate\ProcessPluginBase takes care of implementing - * transform() and calling the configured method. See - * \Drupal\migrate\Plugin\migrate\process\SkipOnEmpty and - * d6_field_instance_widget_settings.yml for examples. + * Migrate process plugins transform the input value.For example, transform a + * human provided name into a machine name, look up an identifier in a previous + * migration and so on. * * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\ProcessPluginBase diff --git a/core/modules/migrate/src/ProcessPluginBase.php b/core/modules/migrate/src/ProcessPluginBase.php index b6a0f5aaf8..2aea55660e 100644 --- a/core/modules/migrate/src/ProcessPluginBase.php +++ b/core/modules/migrate/src/ProcessPluginBase.php @@ -12,10 +12,18 @@ * transform a human provided name into a machine name, look up an identifier * in a previous migration and so on. * + * Process plugins extending this class can use any number of methods, thus + * offering different alternative ways of processing. In this case, the + * transform() method should not be implemented, and the plugin configuration + * must provide the name of the method to be called via the "method" key. Each + * method must have the same signature as transform(). + * * @see https://www.drupal.org/node/2129651 * @see \Drupal\migrate\Plugin\MigratePluginManager * @see \Drupal\migrate\Plugin\MigrateProcessInterface * @see \Drupal\migrate\Annotation\MigrateProcessPlugin + * @see \Drupal\migrate\Plugin\migrate\process\SkipOnEmpty + * @see d7_field_formatter_settings.yml * @see plugin_api * * @ingroup migration -- GitLab