Drupal 8  8.0.2
Migration Class Reference
Inheritance diagram for Migration:

Public Member Functions

 getSourcePlugin ()
 
 getProcessPlugins (array $process=NULL)
 
 getDestinationPlugin ($stub_being_requested=FALSE)
 
 getIdMap ()
 
 getHighWater ()
 
 saveHighWater ($high_water)
 
 setStatus ($status)
 
 getStatus ()
 
 getStatusLabel ()
 
 getInterruptionResult ()
 
 clearInterruptionResult ()
 
 interruptMigration ($result)
 
 allRowsProcessed ()
 
 set ($property_name, $value)
 
 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 ()
 
 trustData ()
 
 calculateDependencies ()
 
- Public Member Functions inherited from ConfigEntityBase
 __construct (array $values, $entity_type)
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 isNew ()
 
 get ($property_name)
 
 set ($property_name, $value)
 
 enable ()
 
 disable ()
 
 setStatus ($status)
 
 status ()
 
 setSyncing ($syncing)
 
 isSyncing ()
 
 setUninstalling ($uninstalling)
 
 isUninstalling ()
 
 createDuplicate ()
 
 preSave (EntityStorageInterface $storage)
 
 calculateDependencies ()
 
 urlInfo ($rel= 'edit-form', array $options=[])
 
 url ($rel= 'edit-form', $options=array())
 
 link ($text=NULL, $rel= 'edit-form', array $options=[])
 
 toUrl ($rel= 'edit-form', array $options=[])
 
 getCacheTagsToInvalidate ()
 
 getDependencies ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
 onDependencyRemoval (array $dependencies)
 
 setThirdPartySetting ($module, $key, $value)
 
 getThirdPartySetting ($module, $key, $default=NULL)
 
 getThirdPartySettings ($module)
 
 unsetThirdPartySetting ($module, $key)
 
 getThirdPartyProviders ()
 
 isInstallable ()
 
 trustData ()
 
 hasTrustedData ()
 
 save ()
 
- Public Member Functions inherited from Entity
 __construct (array $values, $entity_type)
 
 id ()
 
 uuid ()
 
 isNew ()
 
 enforceIsNew ($value=TRUE)
 
 getEntityTypeId ()
 
 bundle ()
 
 label ()
 
 urlInfo ($rel= 'canonical', array $options=[])
 
 toUrl ($rel= 'canonical', array $options=[])
 
 hasLinkTemplate ($rel)
 
 link ($text=NULL, $rel= 'canonical', array $options=[])
 
 toLink ($text=NULL, $rel= 'canonical', array $options=[])
 
 url ($rel= 'canonical', $options=array())
 
 uriRelationships ()
 
 access ($operation, AccountInterface $account=NULL, $return_as_object=FALSE)
 
 language ()
 
 save ()
 
 delete ()
 
 createDuplicate ()
 
 getEntityType ()
 
 preSave (EntityStorageInterface $storage)
 
 postSave (EntityStorageInterface $storage, $update=TRUE)
 
 postCreate (EntityStorageInterface $storage)
 
 referencedEntities ()
 
 getCacheContexts ()
 
 getCacheTagsToInvalidate ()
 
 getCacheTags ()
 
 getCacheMaxAge ()
 
 getOriginalId ()
 
 setOriginalId ($id)
 
 toArray ()
 
 getTypedData ()
 
 __sleep ()
 
 getConfigDependencyKey ()
 
 getConfigDependencyName ()
 
 getConfigTarget ()
 
- 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 RequirementsInterface
 checkRequirements ()
 

Protected Member Functions

 getProcessNormalized (array $process)
 
 getHighWaterStorage ()
 
 getEntityManager ()
 
- Protected Member Functions inherited from ConfigEntityBase
 getTypedConfig ()
 
 addDependency ($type, $name)
 
 invalidateTagsOnSave ($update)
 
- Protected Member Functions inherited from Entity
 entityManager ()
 
 entityTypeManager ()
 
 languageManager ()
 
 uuidGenerator ()
 
 linkTemplates ()
 
 urlRouteParameters ($rel)
 
 invalidateTagsOnSave ($update)
 

Protected Attributes

 $id
 
 $label
 
 $row
 
 $source
 
 $sourcePlugin
 
 $process = []
 
 $processPlugins = []
 
 $destination
 
 $destinationPlugin
 
 $idMap = []
 
 $idMapPlugin
 
 $sourceIds = []
 
 $destinationIds = []
 
 $highWaterProperty
 
 $systemOfRecord = self::SOURCE
 
 $sourceRowStatus = MigrateIdMapInterface::STATUS_IMPORTED
 
 $highWaterStorage
 
 $trackLastImported = FALSE
 
 $requirements = []
 
 $migration_dependencies = []
 
 $dependencies = []
 
 $template
 
 $entityManager
 
 $statusLabels
 
- Protected Attributes inherited from ConfigEntityBase
 $originalId
 
 $pluginConfigKey
 
 $status = TRUE
 
 $uuid
 
 $langcode = 'en'
 
 $third_party_settings = array()
 
 $_core = []
 
 $trustedData = FALSE
 
- Protected Attributes inherited from Entity
 $entityTypeId
 
 $enforceIsNew
 
 $typedData
 

Additional Inherited Members

- Static Public Member Functions inherited from ConfigEntityBase
static sort (ConfigEntityInterface $a, ConfigEntityInterface $b)
 
- Static Public Member Functions inherited from Entity
static preCreate (EntityStorageInterface $storage, array &$values)
 
static preDelete (EntityStorageInterface $storage, array $entities)
 
static postDelete (EntityStorageInterface $storage, array $entities)
 
static postLoad (EntityStorageInterface $storage, array &$entities)
 
static load ($id)
 
static loadMultiple (array $ids=NULL)
 
static create (array $values=array())
 
- Data Fields inherited from MigrationInterface
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
 
- Static Protected Member Functions inherited from ConfigEntityBase
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 
static getConfigManager ()
 
- Static Protected Member Functions inherited from Entity
static invalidateTagsOnDelete (EntityTypeInterface $entity_type, array $entities)
 

Detailed Description

Defines the Migration entity.

The migration entity stores the information about a single migration, like the source, process and destination plugins.

( id = "migration", label = ("Migration"), handlers = { "storage" = "Drupal\migrate\MigrationStorage" }, entity_keys = { "id" = "id", "label" = "label", "weight" = "weight" } )

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.
}

Implements MigrationInterface.

References Migration\getIdMap(), and Migration\getSourcePlugin().

Here is the call graph for this function:

calculateDependencies ( )

{Calculates dependencies and stores them in the dependency property.

Returns
$this
See Also
}

Implements ConfigEntityInterface.

References ConfigEntityBase\addDependency(), Migration\getDestinationPlugin(), Migration\getEntityManager(), Entity\getEntityType(), Migration\getMigrationDependencies(), and Migration\getSourcePlugin().

Here is the call graph for this function:

clearInterruptionResult ( )

{Clears the result to return upon interruption.}

Implements MigrationInterface.

References Drupal\keyValue().

Here is the call graph for this function:

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.
}

Implements MigrationInterface.

References Drupal\destination(), and Drupal\service().

Referenced by Migration\calculateDependencies().

Here is the call graph for this function:

Here is the caller graph for this function:

getEntityManager ( )
protected

Get the entity manager.

Returns
The entity manager.

References Entity\entityManager(), and Drupal\entityManager().

Referenced by Migration\calculateDependencies().

Here is the call graph for this function:

Here is the caller graph for this function:

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.
}

Implements MigrationInterface.

References Migration\getHighWaterStorage().

Here is the call graph for this function:

getHighWaterStorage ( )
protected

Get the high water storage object.

Returns
The storage object.

References Drupal\keyValue().

Referenced by Migration\getHighWater(), and Migration\saveHighWater().

Here is the call graph for this function:

Here is the caller graph for this function:

getIdMap ( )

{Returns the initialized id_map plugin.

Returns
The ID map.
}

Implements MigrationInterface.

References Drupal\service().

Referenced by Migration\allRowsProcessed().

Here is the call graph for this function:

Here is the caller graph for this function:

getInterruptionResult ( )

{Get the result to return upon interruption.

Returns
int The current interruption result. Defaults to RESULT_INCOMPLETE.
}

Implements MigrationInterface.

getMigrationDependencies ( )

{Get the dependencies for this migration.

Returns
array The dependencies for this migrations.
}

Implements MigrationInterface.

Referenced by Migration\calculateDependencies().

Here is the caller graph for this function:

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.
}

Implements MigrationInterface.

References Migration\getProcessNormalized().

Referenced by Migration\mergeProcessOfProperty().

Here is the call graph for this function:

Here is the caller graph for this function:

getProcessNormalized ( array  $process)
protected

Resolve shorthands into a list of plugin configurations.

Parameters
array$processA process configuration array.
Returns
array The normalized process configuration.

Referenced by Migration\getProcess(), Migration\getProcessPlugins(), and Migration\mergeProcessOfProperty().

Here is the caller graph for this function:

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.
}

Implements MigrationInterface.

References Migration\getProcessNormalized(), and Drupal\service().

Here is the call graph for this function:

getSourcePlugin ( )

{Returns the initialized source plugin.

Returns
The source plugin.
}

Implements MigrationInterface.

References Drupal\service().

Referenced by Migration\allRowsProcessed(), and Migration\calculateDependencies().

Here is the call graph for this function:

Here is the caller graph for this function:

getStatus ( )

{Get the current migration status.

Returns
int The current migration status. Defaults to STATUS_IDLE.
}

Implements MigrationInterface.

Referenced by Migration\getStatusLabel().

Here is the caller graph for this function:

getStatusLabel ( )

{Retrieve a label for the current status.

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

Implements MigrationInterface.

References Migration\getStatus().

Here is the call graph for this function:

getSystemOfRecord ( )

{Get the current system of record of the migration.

Returns
string The current system of record of the migration.
}

Implements MigrationInterface.

interruptMigration (   $result)

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

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

Implements MigrationInterface.

References Drupal\keyValue(), Migration\setStatus(), and MigrationInterface\STATUS_STOPPING.

Here is the call graph for this function:

isTrackLastImported ( )

{Checks if the migration should track time of last import.

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

Implements MigrationInterface.

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().
}

Implements MigrationInterface.

References Migration\getProcess(), Migration\getProcessNormalized(), NestedArray\mergeDeepArray(), and Migration\setProcessOfProperty().

Here is the call graph for this function:

saveHighWater (   $high_water)

{Save the new high water mark.

Parameters
int$high_waterThe high water timestamp.
}

Implements MigrationInterface.

References Migration\getHighWaterStorage().

Here is the call graph for this function:

set (   $property_name,
  $value 
)

{Sets the value of a property.

Parameters
string$property_nameThe name of the property that should be set.
mixed$valueThe value the property should be set to.
Returns
$this
}

Implements ConfigEntityInterface.

setProcess ( array  $process)

{Allows you to override the entire process configuration.

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

Implements MigrationInterface.

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.
}

Implements MigrationInterface.

Referenced by Migration\mergeProcessOfProperty().

Here is the caller graph for this function:

setStatus (   $status)

{Set the current migration status.

Parameters
int$resultOne of the STATUS_* constants.
}

Implements MigrationInterface.

References Drupal\keyValue().

Referenced by Migration\interruptMigration().

Here is the call graph for this function:

Here is the caller graph for this function:

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
}

Implements MigrationInterface.

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
}

Implements MigrationInterface.

trustData ( )

{Sets that the data should be trusted.If the data is trusted then dependencies will not be calculated on save and schema will not be used to cast the values. Generally this is only used during module and theme installation. Once the config entity has been saved the data will no longer be marked as trusted. This is an optimization for creation of configuration during installation.

Returns
$this
See Also
::createConfiguration()
}

Implements ConfigEntityInterface.

Field Documentation

$statusLabels
protected
Initial value:
= [
self::STATUS_IDLE => 'Idle'

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