You are here

interface MigrationInterface in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Entity/MigrationInterface.php \Drupal\migrate\Entity\MigrationInterface

Interface for migrations.

Hierarchy

Expanded class hierarchy of MigrationInterface

All classes that implement MigrationInterface

70 files declare their use of MigrationInterface
BlockedIp.php in core/modules/ban/src/Plugin/migrate/destination/BlockedIp.php
Contains \Drupal\ban\Plugin\migrate\destination\BlockedIP.
BlockPluginId.php in core/modules/block/src/Plugin/migrate/process/BlockPluginId.php
Contains \Drupal\block\Plugin\migrate\process\BlockPluginId.
BlockTheme.php in core/modules/block/src/Plugin/migrate/process/BlockTheme.php
Contains \Drupal\block\Plugin\migrate\process\BlockTheme.
BlockVisibility.php in core/modules/block/src/Plugin/migrate/process/BlockVisibility.php
Contains \Drupal\block\Plugin\migrate\process\BlockVisibility.
CckBuilder.php in core/modules/migrate_drupal/src/Plugin/migrate/builder/CckBuilder.php
Contains \Drupal\migrate_drupal\Plugin\migrate\builder\CckBuilder.

... See full list

File

core/modules/migrate/src/Entity/MigrationInterface.php, line 15
Contains \Drupal\migrate\Entity\MigrationInterface.

Namespace

Drupal\migrate\Entity
View source
interface MigrationInterface extends ConfigEntityInterface {

  /**
   * A constant used for systemOfRecord.
   */
  const SOURCE = 'source';

  /**
   * A constant used for systemOfRecord.
   */
  const DESTINATION = 'destination';

  /**
   * The migration is currently not running.
   */
  const STATUS_IDLE = 0;

  /**
   * The migration is currently importing.
   */
  const STATUS_IMPORTING = 1;

  /**
   * The migration is currently being rolled back.
   */
  const STATUS_ROLLING_BACK = 2;

  /**
   * The migration is being stopped.
   */
  const STATUS_STOPPING = 3;

  /**
   * The migration has been disabled.
   */
  const STATUS_DISABLED = 4;

  /**
   * Migration error.
   */
  const MESSAGE_ERROR = 1;

  /**
   * Migration warning.
   */
  const MESSAGE_WARNING = 2;

  /**
   * Migration notice.
   */
  const MESSAGE_NOTICE = 3;

  /**
   * Migration info.
   */
  const MESSAGE_INFORMATIONAL = 4;

  /**
   * All records have been processed.
   */
  const RESULT_COMPLETED = 1;

  /**
   * The process has stopped itself (e.g., the memory limit is approaching).
   */
  const RESULT_INCOMPLETE = 2;

  /**
   * The process was stopped externally (e.g., via drush migrate-stop).
   */
  const RESULT_STOPPED = 3;

  /**
   * The process had a fatal error.
   */
  const RESULT_FAILED = 4;

  /**
   * Dependencies are unfulfilled - skip the process.
   */
  const RESULT_SKIPPED = 5;

  /**
   * This migration is disabled, skipping.
   */
  const RESULT_DISABLED = 6;

  /**
   * Returns the initialized source plugin.
   *
   * @return \Drupal\migrate\Plugin\MigrateSourceInterface
   *   The source plugin.
   */
  public function getSourcePlugin();

  /**
   * Returns the process plugins.
   *
   * @param array $process
   *   A process configuration array.
   *
   * @return \Drupal\migrate\Plugin\MigrateProcessInterface[][]
   *   An associative array. The keys are the destination property names. Values
   *   are process pipelines. Each pipeline contains an array of plugins.
   */
  public function getProcessPlugins(array $process = NULL);

  /**
   * Returns the initialized destination plugin.
   *
   * @param bool $stub_being_requested
   *  TRUE to indicate that this destination will be asked to construct a stub.
   *
   * @return \Drupal\migrate\Plugin\MigrateDestinationInterface
   *   The destination plugin.
   */
  public function getDestinationPlugin($stub_being_requested = FALSE);

  /**
   * Returns the initialized id_map plugin.
   *
   * @return \Drupal\migrate\Plugin\MigrateIdMapInterface
   *   The ID map.
   */
  public function getIdMap();

  /**
   * 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.
   *
   * @return int
   *   A Unix timestamp representing the high water mark.
   */
  public function getHighWater();

  /**
   * Save the new high water mark.
   *
   * @param int $high_water
   *   The high water timestamp.
   */
  public function saveHighWater($high_water);

  /**
   * Check if all source rows from this migration have been processed.
   *
   * @return bool
   *   TRUE if this migration is complete otherwise FALSE.
   */
  public function allRowsProcessed();

  /**
   * Set the current migration status.
   *
   * @param int $result
   *   One of the STATUS_* constants.
   */
  public function setStatus($status);

  /**
   * Get the current migration status.
   *
   * @return int
   *   The current migration status. Defaults to STATUS_IDLE.
   */
  public function getStatus();

  /**
   * Retrieve a label for the current status.
   *
   * @return string
   *   User-friendly string corresponding to a STATUS_ constant.
   */
  public function getStatusLabel();

  /**
   * Get the result to return upon interruption.
   *
   * @return int
   *   The current interruption result. Defaults to RESULT_INCOMPLETE.
   */
  public function getInterruptionResult();

  /**
   * Clears the result to return upon interruption.
   */
  public function clearInterruptionResult();

  /**
   * Signal that the migration should be interrupted with the specified result
   * code.
   *
   * @param int $result
   *   One of the MigrationInterface::RESULT_* constants.
   */
  public function interruptMigration($result);

  /**
   * 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 https://www.drupal.org/node/2129651#get-shorthand
   *
   * @return array
   *   The normalized configuration describing the process plugins.
   */
  public function getProcess();

  /**
   * Allows you to override the entire process configuration.
   *
   * @param array $process
   *   The entire process pipeline configuration describing the process plugins.
   *
   * @return $this
   */
  public function setProcess(array $process);

  /**
   * 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.
   *
   * @param string $property
   *   The property of which to set the process pipeline configuration.
   * @param mixed $process_of_property
   *   The process pipeline configuration to be set for this property.
   *
   * @return $this
   *   The migration entity.
   */
  public function setProcessOfProperty($property, $process_of_property);

  /**
   * Merge the process pipeline configuration for a single property.
   *
   * @param string $property
   *   The property of which to merge the passed in process pipeline
   * configuration.
   * @param array $process_of_property
   *   The process pipeline configuration to be merged with the existing process
   * pipeline configuration.
   *
   * @return $this
   *   The migration entity.
   *
   * @see Drupal\migrate_drupal\Plugin\migrate\load\LoadEntity::processLinkField().
   */
  public function mergeProcessOfProperty($property, array $process_of_property);

  /**
   * Get the current system of record of the migration.
   *
   * @return string
   *   The current system of record of the migration.
   */
  public function getSystemOfRecord();

  /**
   * Set the system of record for the migration.
   *
   * @param string $system_of_record
   *   The system of record of the migration.
   *
   * @return $this
   */
  public function setSystemOfRecord($system_of_record);

  /**
   * Checks if the migration should track time of last import.
   *
   * @return bool
   *   TRUE if the migration is tracking last import time.
   */
  public function isTrackLastImported();

  /**
   * Set if the migration should track time of last import.
   *
   * @param bool $track_last_imported
   *   Boolean value to indicate if the migration should track last import time.
   *
   * @return $this
   */
  public function setTrackLastImported($track_last_imported);

  /**
   * Get the dependencies for this migration.
   *
   * @return array
   *   The dependencies for this migrations.
   */
  public function getMigrationDependencies();

}

Members

Namesort descending Modifiers Type Description Overrides
AccessibleInterface::access public function Checks data value access. 5
CacheableDependencyInterface::getCacheContexts public function The cache contexts associated with this object. 26
CacheableDependencyInterface::getCacheMaxAge public function The maximum age for which this object may be cached. 26
CacheableDependencyInterface::getCacheTags public function The cache tags associated with this object. 19
ConfigEntityInterface::calculateDependencies public function Calculates dependencies and stores them in the dependency property. 2
ConfigEntityInterface::disable public function Disables the configuration entity. 2
ConfigEntityInterface::enable public function Enables the configuration entity. 2
ConfigEntityInterface::get public function Returns the value of a property. 2
ConfigEntityInterface::getDependencies public function Gets the configuration dependencies. 2
ConfigEntityInterface::hasTrustedData public function Gets whether on not the data is trusted. 2
ConfigEntityInterface::isInstallable public function Checks whether this entity is installable. 2
ConfigEntityInterface::isSyncing public function Returns whether this entity is being changed as part of an import process. 2
ConfigEntityInterface::isUninstalling public function Returns whether this entity is being changed during the uninstall process. 2
ConfigEntityInterface::onDependencyRemoval public function Informs the entity that entities it depends on will be deleted. 2
ConfigEntityInterface::set public function Sets the value of a property. 2
ConfigEntityInterface::setSyncing public function Sets the status of the isSyncing flag. 2
ConfigEntityInterface::status public function Returns whether the configuration entity is enabled. 2
ConfigEntityInterface::trustData public function Sets that the data should be trusted. 2
EntityInterface::bundle public function Gets the bundle of the entity. 2
EntityInterface::create public static function Constructs a new entity object, without permanently saving it. 2
EntityInterface::createDuplicate public function Creates a duplicate of the entity. 2
EntityInterface::delete public function Deletes an entity permanently. 2
EntityInterface::enforceIsNew public function Enforces an entity to be new. 2
EntityInterface::getCacheTagsToInvalidate public function Returns the cache tags that should be used to invalidate caches. 2
EntityInterface::getConfigDependencyKey public function Gets the key that is used to store configuration dependencies. 2
EntityInterface::getConfigDependencyName public function Gets the configuration dependency name. 2
EntityInterface::getConfigTarget public function Gets the configuration target identifier for the entity. 2
EntityInterface::getEntityType public function Gets the entity type definition. 2
EntityInterface::getEntityTypeId public function Gets the ID of the type of the entity. 2
EntityInterface::getOriginalId public function Gets the original ID. 2
EntityInterface::getTypedData public function Gets a typed data object for this entity object. 2
EntityInterface::hasLinkTemplate public function Indicates if a link template exists for a given key. 2
EntityInterface::id public function Gets the identifier. 2
EntityInterface::isNew public function Determines whether the entity is new. 2
EntityInterface::label public function Gets the label of the entity. 2
EntityInterface::language public function Gets the language of the entity. 2
EntityInterface::link Deprecated public function Deprecated way of generating a link to the entity. See toLink(). 2
EntityInterface::load public static function Loads an entity. 2
EntityInterface::loadMultiple public static function Loads one or more entities. 2
EntityInterface::postCreate public function Acts on an entity after it is created but before hooks are invoked. 2
EntityInterface::postDelete public static function Acts on deleted entities before the delete hook is invoked. 2
EntityInterface::postLoad public static function Acts on loaded entities. 3
EntityInterface::postSave public function Acts on a saved entity before the insert or update hook is invoked. 2
EntityInterface::preCreate public static function Changes the values of an entity before it is created. 2
EntityInterface::preDelete public static function Acts on entities before they are deleted and before hooks are invoked. 2
EntityInterface::preSave public function Acts on an entity before the presave hook is invoked. 2
EntityInterface::referencedEntities public function Gets a list of entities referenced by this entity. 2
EntityInterface::save public function Saves an entity permanently. 2
EntityInterface::setOriginalId public function Sets the original ID. 2
EntityInterface::toArray public function Gets an array of all property values. 3
EntityInterface::toLink public function Generates the HTML for a link to this entity. 2
EntityInterface::toUrl public function Gets the URL object for the entity. 2
EntityInterface::uriRelationships public function Gets a list of URI relationships supported by this entity. 2
EntityInterface::url Deprecated public function Gets the public URL for this entity. 2
EntityInterface::urlInfo Deprecated public function Gets the URL object for the entity. 2
EntityInterface::uuid public function Gets the entity UUID (Universally Unique Identifier). 2
MigrationInterface::allRowsProcessed public function Check if all source rows from this migration have been processed. 1
MigrationInterface::clearInterruptionResult public function Clears the result to return upon interruption. 1
MigrationInterface::DESTINATION constant A constant used for systemOfRecord.
MigrationInterface::getDestinationPlugin public function Returns the initialized destination plugin. 1
MigrationInterface::getHighWater public function The current value of the high water mark. 1
MigrationInterface::getIdMap public function Returns the initialized id_map plugin. 1
MigrationInterface::getInterruptionResult public function Get the result to return upon interruption. 1
MigrationInterface::getMigrationDependencies public function Get the dependencies for this migration. 1
MigrationInterface::getProcess public function Get the normalized process pipeline configuration describing the process plugins. 1
MigrationInterface::getProcessPlugins public function Returns the process plugins. 1
MigrationInterface::getSourcePlugin public function Returns the initialized source plugin. 1
MigrationInterface::getStatus public function Get the current migration status. 1
MigrationInterface::getStatusLabel public function Retrieve a label for the current status. 1
MigrationInterface::getSystemOfRecord public function Get the current system of record of the migration. 1
MigrationInterface::interruptMigration public function Signal that the migration should be interrupted with the specified result code. 1
MigrationInterface::isTrackLastImported public function Checks if the migration should track time of last import. 1
MigrationInterface::mergeProcessOfProperty public function Merge the process pipeline configuration for a single property. 1
MigrationInterface::MESSAGE_ERROR constant Migration error.
MigrationInterface::MESSAGE_INFORMATIONAL constant Migration info.
MigrationInterface::MESSAGE_NOTICE constant Migration notice.
MigrationInterface::MESSAGE_WARNING constant Migration warning.
MigrationInterface::RESULT_COMPLETED constant All records have been processed.
MigrationInterface::RESULT_DISABLED constant This migration is disabled, skipping.
MigrationInterface::RESULT_FAILED constant The process had a fatal error.
MigrationInterface::RESULT_INCOMPLETE constant The process has stopped itself (e.g., the memory limit is approaching).
MigrationInterface::RESULT_SKIPPED constant Dependencies are unfulfilled - skip the process.
MigrationInterface::RESULT_STOPPED constant The process was stopped externally (e.g., via drush migrate-stop).
MigrationInterface::saveHighWater public function Save the new high water mark. 1
MigrationInterface::setProcess public function Allows you to override the entire process configuration. 1
MigrationInterface::setProcessOfProperty public function Set the process pipeline configuration for an individual destination field. 1
MigrationInterface::setStatus public function Set the current migration status. Overrides ConfigEntityInterface::setStatus
MigrationInterface::setSystemOfRecord public function Set the system of record for the migration. 1
MigrationInterface::setTrackLastImported public function Set if the migration should track time of last import. 1
MigrationInterface::SOURCE constant A constant used for systemOfRecord.
MigrationInterface::STATUS_DISABLED constant The migration has been disabled.
MigrationInterface::STATUS_IDLE constant The migration is currently not running.
MigrationInterface::STATUS_IMPORTING constant The migration is currently importing.
MigrationInterface::STATUS_ROLLING_BACK constant The migration is currently being rolled back.
MigrationInterface::STATUS_STOPPING constant The migration is being stopped.
RefinableCacheableDependencyInterface::addCacheableDependency public function Adds a dependency on an object: merges its cacheability metadata. 1
RefinableCacheableDependencyInterface::addCacheContexts public function Adds cache contexts. 1
RefinableCacheableDependencyInterface::addCacheTags public function Adds cache tags. 1
RefinableCacheableDependencyInterface::mergeCacheMaxAge public function Merges the maximum age (in seconds) with the existing maximum age. 1
ThirdPartySettingsInterface::getThirdPartyProviders public function Gets the list of third parties that store information. 3
ThirdPartySettingsInterface::getThirdPartySetting public function Gets the value of a third-party setting. 3
ThirdPartySettingsInterface::getThirdPartySettings public function Gets all third-party settings of a given module. 3
ThirdPartySettingsInterface::setThirdPartySetting public function Sets the value of a third-party setting. 3
ThirdPartySettingsInterface::unsetThirdPartySetting public function Unsets a third-party setting. 3