1. 8.5.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface
  2. 8.0.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface
  3. 8.1.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface
  4. 8.2.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface
  5. 8.3.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface
  6. 8.4.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface
  7. 8.6.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php MigrateProcessInterface

An interface for migrate process plugins.

A process plugin can use any number of methods instead of (but not in addition to) transform with the same arguments and then the plugin configuration needs to provide the name of the method to be called via the "method" key. See \Drupal\migrate\Plugin\migrate\process\SkipOnEmpty and migrate.migration.d6_field_instance_widget_settings.yml for examples.

Hierarchy

Expanded class hierarchy of MigrateProcessInterface

All classes that implement MigrateProcessInterface

See also

\Drupal\migrate\Plugin\MigratePluginManager

\Drupal\migrate\ProcessPluginBase

\Drupal\migrate\Annotation\MigrateProcessPlugin

Plugin API

Related topics

12 files declare their use of MigrateProcessInterface
BlockPluginId.php in core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
BlockVisibility.php in core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
BlockVisibilityTest.php in core/modules/block/tests/src/Unit/Plugin/migrate/process/BlockVisibilityTest.php
CckFileTest.php in core/modules/file/tests/src/Unit/Plugin/migrate/process/d6/CckFileTest.php
FieldFile.php in core/modules/file/src/Plugin/migrate/process/d6/FieldFile.php

... See full list

File

core/modules/migrate/src/Plugin/MigrateProcessInterface.php, line 25

Namespace

Drupal\migrate\Plugin
View source
interface MigrateProcessInterface extends PluginInspectionInterface {

  /**
   * Performs the associated process.
   *
   * @param mixed $value
   *   The value to be transformed.
   * @param \Drupal\migrate\MigrateExecutableInterface $migrate_executable
   *   The migration in which this process is being executed.
   * @param \Drupal\migrate\Row $row
   *   The row from the source to process. Normally, just transforming the value
   *   is adequate but very rarely you might need to change two columns at the
   *   same time or something like that.
   * @param string $destination_property
   *   The destination property currently worked on. This is only used together
   *   with the $row above.
   *
   * @return string|array
   *   The newly transformed value.
   */
  public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property);

  /**
   * Indicates whether the returned value requires multiple handling.
   *
   * @return bool
   *   TRUE when the returned value contains a list of values to be processed.
   *   For example, when the 'source' property is a string and the value found
   *   is an array.
   */
  public function multiple();

}

Members

Contains filters are case sensitive
Namesort descending Modifiers Type Description Overrides
MigrateProcessInterface::multiple public function Indicates whether the returned value requires multiple handling.
MigrateProcessInterface::transform public function Performs the associated process.
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation.
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance.