interface MigrateProcessInterface implements PluginInspectionInterface (View source)

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.

Methods

string
getPluginId()

Gets the plugin_id of the plugin instance.

array
getPluginDefinition()

Gets the definition of the plugin implementation.

mixed
transform(mixed $value, MigrateExecutableInterface $migrate_executable, Row $row, string $destination_property)

Performs the associated process.

bool
multiple()

Indicates whether the returned value requires multiple handling.

Details

string getPluginId()

Gets the plugin_id of the plugin instance.

Return Value

string

The plugin_id of the plugin instance.

array getPluginDefinition()

Gets the definition of the plugin implementation.

Return Value

array

The plugin definition, as returned by the discovery object used by the plugin manager.

mixed transform(mixed $value, MigrateExecutableInterface $migrate_executable, Row $row, string $destination_property)

Performs the associated process.

Parameters

mixed $value

The value to be transformed.

MigrateExecutableInterface $migrate_executable

The migration in which this process is being executed.

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.

string $destination_property

The destination property currently worked on. This is only used together with the $row above.

Return Value

mixed

The newly transformed value.

bool multiple()

Indicates whether the returned value requires multiple handling.

Return Value

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.