3 namespace Drupal\migrate\Plugin;
5 use Drupal\Component\Plugin\PluginInspectionInterface;
6 use Drupal\migrate\MigrateExecutableInterface;
7 use Drupal\migrate\Row;
10 * An interface for migrate process plugins.
12 * A process plugin can use any number of methods instead of (but not in
13 * addition to) transform with the same arguments and then the plugin
14 * configuration needs to provide the name of the method to be called via the
15 * "method" key. See \Drupal\migrate\Plugin\migrate\process\SkipOnEmpty and
16 * migrate.migration.d6_field_instance_widget_settings.yml for examples.
18 * @see \Drupal\migrate\Plugin\MigratePluginManager
19 * @see \Drupal\migrate\ProcessPluginBase
20 * @see \Drupal\migrate\Annotation\MigrateProcessPlugin
25 interface MigrateProcessInterface extends PluginInspectionInterface {
28 * Performs the associated process.
31 * The value to be transformed.
32 * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
33 * The migration in which this process is being executed.
34 * @param \Drupal\migrate\Row $row
35 * The row from the source to process. Normally, just transforming the value
36 * is adequate but very rarely you might need to change two columns at the
37 * same time or something like that.
38 * @param string $destination_property
39 * The destination property currently worked on. This is only used together
40 * with the $row above.
42 * @return string|array
43 * The newly transformed value.
45 public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property);
48 * Indicates whether the returned value requires multiple handling.
51 * TRUE when the returned value contains a list of values to be processed.
52 * For example, when the 'source' property is a string and the value found
55 public function multiple();