MigrationInterface
interface MigrationInterface implements PluginInspectionInterface, DerivativeInspectionInterface (View source)
Interface for migrations.
Constants
| STATUS_IDLE |
The migration is currently not running. |
| STATUS_IMPORTING |
The migration is currently importing. |
| STATUS_ROLLING_BACK |
The migration is currently being rolled back. |
| STATUS_STOPPING |
The migration is being stopped. |
| STATUS_DISABLED |
The migration has been disabled. |
| MESSAGE_ERROR |
Migration error. |
| MESSAGE_WARNING |
Migration warning. |
| MESSAGE_NOTICE |
Migration notice. |
| MESSAGE_INFORMATIONAL |
Migration info. |
| RESULT_COMPLETED |
All records have been processed. |
| RESULT_INCOMPLETE |
The process has stopped itself (e.g., the memory limit is approaching). |
| RESULT_STOPPED |
The process was stopped externally (e.g., via drush migrate-stop). |
| RESULT_FAILED |
The process had a fatal error. |
| RESULT_SKIPPED |
Dependencies are unfulfilled - skip the process. |
| RESULT_DISABLED |
This migration is disabled, skipping. |
Methods
Gets the definition of the plugin implementation.
Gets the base_plugin_id of the plugin instance.
Gets the derivative_id of the plugin instance.
An alias for getPluginId() for backwards compatibility reasons.
Get the plugin label.
Returns the initialized source plugin.
Returns the process plugins.
Returns the initialized destination plugin.
Returns the initialized id_map plugin.
Check if all source rows from this migration have been processed.
Set the current migration status.
Get the current migration status.
Retrieve a label for the current status.
Get the result to return upon interruption.
Clears the result to return upon interruption.
Signal that the migration should be interrupted with the specified result code.
Get the normalized process pipeline configuration describing the process plugins.
Allows you to override the entire process configuration.
Set the process pipeline configuration for an individual destination field.
Merge the process pipeline configuration for a single property.
Checks if the migration should track time of last import.
Set if the migration should track time of last import.
Get the dependencies for this migration.
Get the destination configuration, with at least a 'plugin' key.
Get the source configuration, with at least a 'plugin' key.
If true, track time of last import.
The destination identifiers.
The migration tags.
Indicates if the migration is auditable.
Details
string
getPluginId()
Gets the plugin_id of the plugin instance.
array
getPluginDefinition()
Gets the definition of the plugin implementation.
string
getBaseId()
Gets the base_plugin_id of the plugin instance.
string|null
getDerivativeId()
Gets the derivative_id of the plugin instance.
string
id()
An alias for getPluginId() for backwards compatibility reasons.
string
label()
Get the plugin label.
MigrateSourceInterface
getSourcePlugin()
Returns the initialized source plugin.
MigrateProcessInterface[][]
getProcessPlugins(array $process = NULL)
Returns the process plugins.
MigrateDestinationInterface
getDestinationPlugin(bool $stub_being_requested = FALSE)
Returns the initialized destination plugin.
MigrateIdMapInterface
getIdMap()
Returns the initialized id_map plugin.
bool
allRowsProcessed()
Check if all source rows from this migration have been processed.
setStatus(int $status)
Set the current migration status.
int
getStatus()
Get the current migration status.
string
getStatusLabel()
Retrieve a label for the current status.
int
getInterruptionResult()
Get the result to return upon interruption.
clearInterruptionResult()
Clears the result to return upon interruption.
interruptMigration(int $result)
Signal that the migration should be interrupted with the specified result code.
array
getProcess()
Get the normalized process pipeline configuration describing the process plugins.
The process configuration is always normalized. All shorthand processing will be expanded into their full representations.
$this
setProcess(array $process)
Allows you to override the entire process configuration.
$this
setProcessOfProperty(string $property, mixed $process_of_property)
Set the process pipeline configuration for an individual destination field.
This method allows you to set the process pipeline configuration for a single property within the full process pipeline configuration.
$this
mergeProcessOfProperty(string $property, array $process_of_property)
Merge the process pipeline configuration for a single property.
bool
isTrackLastImported()
Checks if the migration should track time of last import.
$this
setTrackLastImported(bool $track_last_imported)
Set if the migration should track time of last import.
array
getMigrationDependencies()
Get the dependencies for this migration.
array
getDestinationConfiguration()
Get the destination configuration, with at least a 'plugin' key.
array
getSourceConfiguration()
Get the source configuration, with at least a 'plugin' key.
bool
getTrackLastImported()
If true, track time of last import.
array
getDestinationIds()
The destination identifiers.
An array of destination identifiers: the keys are the name of the properties, the values are dependent on the ID map plugin.
array
getMigrationTags()
The migration tags.
bool
isAuditable()
Indicates if the migration is auditable.