interface MigrateProcessInterface

Same name and namespace in other branches
  1. 9 core/modules/migrate/src/Plugin/MigrateProcessInterface.php \Drupal\migrate\Plugin\MigrateProcessInterface
  2. 8.9.x core/modules/migrate/src/Plugin/MigrateProcessInterface.php \Drupal\migrate\Plugin\MigrateProcessInterface
  3. 10 core/modules/migrate/src/Plugin/MigrateProcessInterface.php \Drupal\migrate\Plugin\MigrateProcessInterface

An interface for migrate process plugins.

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.

Hierarchy

Expanded class hierarchy of MigrateProcessInterface

All classes that implement MigrateProcessInterface

See also

\Drupal\migrate\Plugin\MigratePluginManager

\Drupal\migrate\ProcessPluginBase

\Drupal\migrate\Attribute\MigrateProcess

Plugin API

Related topics

6 files declare their use of MigrateProcessInterface
FileCopy.php in core/modules/migrate/src/Plugin/migrate/process/FileCopy.php
FileCopyTest.php in core/modules/migrate/tests/src/Unit/process/FileCopyTest.php
FileCopyTest.php in core/modules/migrate/tests/src/Kernel/process/FileCopyTest.php
MigrateExecutableTest.php in core/modules/migrate/tests/src/Unit/MigrateExecutableTest.php
MigrateProcessErrorMessagesTest.php in core/modules/migrate/tests/src/Kernel/MigrateProcessErrorMessagesTest.php

... See full list

File

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

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 mixed
     *   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();
    
    /**
     * Determines if the pipeline should stop processing.
     *
     * @return bool
     *   A boolean value indicating if the pipeline processing should stop.
     */
    public function isPipelineStopped() : bool;
    
    /**
     * Resets the internal data of a plugin.
     */
    public function reset() : void;

}

Members

Title Sort descending Modifiers Object type Summary Overrides
MigrateProcessInterface::isPipelineStopped public function Determines if the pipeline should stop processing. 1
MigrateProcessInterface::multiple public function Indicates whether the returned value requires multiple handling. 1
MigrateProcessInterface::reset public function Resets the internal data of a plugin. 1
MigrateProcessInterface::transform public function Performs the associated process. 1
PluginInspectionInterface::getPluginDefinition public function Gets the definition of the plugin implementation. 6
PluginInspectionInterface::getPluginId public function Gets the plugin_id of the plugin instance. 2

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.