Drupal 8  8.0.2
MigrationInterface Interface Reference
Inheritance diagram for MigrationInterface:

Public Member Functions

 getSourcePlugin ()
 
 getProcessPlugins (array $process=NULL)
 
 getDestinationPlugin ($stub_being_requested=FALSE)
 
 getIdMap ()
 
 getHighWater ()
 
 saveHighWater ($high_water)
 
 allRowsProcessed ()
 
 setStatus ($status)
 
 getStatus ()
 
 getStatusLabel ()
 
 getInterruptionResult ()
 
 clearInterruptionResult ()
 
 interruptMigration ($result)
 
 getProcess ()
 
 setProcess (array $process)
 
 setProcessOfProperty ($property, $process_of_property)
 
 mergeProcessOfProperty ($property, array $process_of_property)
 
 getSystemOfRecord ()
 
 setSystemOfRecord ($system_of_record)
 
 isTrackLastImported ()
 
 setTrackLastImported ($track_last_imported)
 
 getMigrationDependencies ()
 
- Public Member Functions inherited from ConfigEntityInterface
 enable ()
 
 disable ()
 
 setSyncing ($status)
 
 status ()
 
 isSyncing ()
 
 isUninstalling ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 calculateDependencies ()
 
 onDependencyRemoval (array $dependencies)
 
 getDependencies ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
- Public Member Functions inherited from EntityInterface
 uuid ()
 
 id ()
 
 language ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=array())
 
 toUrl ($rel= 'canonical', array $options=array())
 
 url ($rel= 'canonical', $options=array())
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($key)
 
 uriRelationships ()
 
 save ()
 
 delete ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 createDuplicate ()
 
 getEntityType ()
 
 referencedEntities ()
 
 getOriginalId ()
 
 getCacheTagsToInvalidate ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- Public Member Functions inherited from AccessibleInterface
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
- Public Member Functions inherited from CacheableDependencyInterface
 getCacheContexts ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
- Public Member Functions inherited from RefinableCacheableDependencyInterface
 addCacheContexts (array $cache_contexts)
 
 addCacheTags (array $cache_tags)
 
 mergeCacheMaxAge ($max_age)
 
 addCacheableDependency ($other_object)
 
- Public Member Functions inherited from ThirdPartySettingsInterface
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 

Data Fields

const SOURCE = 'source'
 
const DESTINATION = 'destination'
 
const STATUS_IDLE = 0
 
const STATUS_IMPORTING = 1
 
const STATUS_ROLLING_BACK = 2
 
const STATUS_STOPPING = 3
 
const STATUS_DISABLED = 4
 
const MESSAGE_ERROR = 1
 
const MESSAGE_WARNING = 2
 
const MESSAGE_NOTICE = 3
 
const MESSAGE_INFORMATIONAL = 4
 
const RESULT_COMPLETED = 1
 
const RESULT_INCOMPLETE = 2
 
const RESULT_STOPPED = 3
 
const RESULT_FAILED = 4
 
const RESULT_SKIPPED = 5
 
const RESULT_DISABLED = 6
 

Additional Inherited Members

- Static Public Member Functions inherited from EntityInterface
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 

Detailed Description

Interface for migrations.

Member Function Documentation

allRowsProcessed ( )

Check if all source rows from this migration have been processed.

Returns
bool TRUE if this migration is complete otherwise FALSE.

Implemented in Migration.

clearInterruptionResult ( )

Clears the result to return upon interruption.

Implemented in Migration.

getDestinationPlugin (   $stub_being_requested = FALSE)

Returns the initialized destination plugin.

Parameters
bool$stub_being_requestedTRUE to indicate that this destination will be asked to construct a stub.
Returns
The destination plugin.

Implemented in Migration.

getHighWater ( )

The current value of the high water mark.

The high water mark defines a timestamp stating the time the import was last run. If the mark is set, only content with a higher timestamp will be imported.

Returns
int A Unix timestamp representing the high water mark.

Implemented in Migration.

getIdMap ( )

Returns the initialized id_map plugin.

Returns
The ID map.

Implemented in Migration.

getInterruptionResult ( )

Get the result to return upon interruption.

Returns
int The current interruption result. Defaults to RESULT_INCOMPLETE.

Implemented in Migration.

getMigrationDependencies ( )

Get the dependencies for this migration.

Returns
array The dependencies for this migrations.

Implemented in Migration.

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.

See Also
https://www.drupal.org/node/2129651#get-shorthand
Returns
array The normalized configuration describing the process plugins.

Implemented in Migration.

getProcessPlugins ( array  $process = NULL)

Returns the process plugins.

Parameters
array$processA process configuration array.
Returns
[][] An associative array. The keys are the destination property names. Values are process pipelines. Each pipeline contains an array of plugins.

Implemented in Migration.

getSourcePlugin ( )

Returns the initialized source plugin.

Returns
The source plugin.

Implemented in Migration.

getStatus ( )

Get the current migration status.

Returns
int The current migration status. Defaults to STATUS_IDLE.

Implemented in Migration.

getStatusLabel ( )

Retrieve a label for the current status.

Returns
string User-friendly string corresponding to a STATUS_ constant.

Implemented in Migration.

getSystemOfRecord ( )

Get the current system of record of the migration.

Returns
string The current system of record of the migration.

Implemented in Migration.

interruptMigration (   $result)

Signal that the migration should be interrupted with the specified result code.

Parameters
int$resultOne of the MigrationInterface::RESULT_* constants.

Implemented in Migration.

isTrackLastImported ( )

Checks if the migration should track time of last import.

Returns
bool TRUE if the migration is tracking last import time.

Implemented in Migration.

mergeProcessOfProperty (   $property,
array  $process_of_property 
)

Merge the process pipeline configuration for a single property.

Parameters
string$propertyThe property of which to merge the passed in process pipeline configuration.
array$process_of_propertyThe process pipeline configuration to be merged with the existing process pipeline configuration.
Returns
$this The migration entity.
See Also
Drupal::processLinkField().

Implemented in Migration.

Referenced by LinkField\processCckFieldValues(), CckFieldPluginBase\processField(), CckFieldPluginBase\processFieldFormatter(), and CckFieldPluginBase\processFieldWidget().

Here is the caller graph for this function:

saveHighWater (   $high_water)

Save the new high water mark.

Parameters
int$high_waterThe high water timestamp.

Implemented in Migration.

setProcess ( array  $process)

Allows you to override the entire process configuration.

Parameters
array$processThe entire process pipeline configuration describing the process plugins.
Returns
$this

Implemented in Migration.

setProcessOfProperty (   $property,
  $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.

Parameters
string$propertyThe property of which to set the process pipeline configuration.
mixed$process_of_propertyThe process pipeline configuration to be set for this property.
Returns
$this The migration entity.

Implemented in Migration.

Referenced by TaxonomyTermReference\processCckFieldValues().

Here is the caller graph for this function:

setStatus (   $status)

Set the current migration status.

Parameters
int$resultOne of the STATUS_* constants.

Implements ConfigEntityInterface.

Implemented in Migration.

setSystemOfRecord (   $system_of_record)

Set the system of record for the migration.

Parameters
string$system_of_recordThe system of record of the migration.
Returns
$this

Implemented in Migration.

setTrackLastImported (   $track_last_imported)

Set if the migration should track time of last import.

Parameters
bool$track_last_importedBoolean value to indicate if the migration should track last import time.
Returns
$this

Implemented in Migration.

Field Documentation

const DESTINATION = 'destination'

A constant used for systemOfRecord.

const MESSAGE_INFORMATIONAL = 4
const MESSAGE_NOTICE = 3
const MESSAGE_WARNING = 2
const RESULT_DISABLED = 6

This migration is disabled, skipping.

const RESULT_FAILED = 4
const RESULT_INCOMPLETE = 2

The process has stopped itself (e.g., the memory limit is approaching).

Referenced by MigrateExecutable\checkStatus(), and MigrateInterruptionTest\postRowSaveEventRecorder().

const RESULT_SKIPPED = 5

Dependencies are unfulfilled - skip the process.

const RESULT_STOPPED = 3

The process was stopped externally (e.g., via drush migrate-stop).

const SOURCE = 'source'

A constant used for systemOfRecord.

const STATUS_DISABLED = 4

The migration has been disabled.

Referenced by MigrateStatusTest\testStatus().

const STATUS_IDLE = 0

The migration is currently not running.

Referenced by MigrateExecutable\import(), MigrateExecutable\rollback(), and MigrateStatusTest\testStatus().

const STATUS_IMPORTING = 1

The migration is currently importing.

Referenced by MigrateExecutable\import(), and MigrateStatusTest\testStatus().

const STATUS_ROLLING_BACK = 2

The migration is currently being rolled back.

Referenced by MigrateExecutable\rollback(), and MigrateStatusTest\testStatus().

const STATUS_STOPPING = 3

The documentation for this interface was generated from the following file: