Drupal 8  8.0.2
DestinationBase Class Reference
Inheritance diagram for DestinationBase:

Public Member Functions

 __construct (array $configuration, $plugin_id, $plugin_definition, MigrationInterface $migration)
 
 rollbackAction ()
 
 checkRequirements ()
 
 rollback (array $destination_identifier)
 
 supportsRollback ()
 
- Public Member Functions inherited from MigrateDestinationInterface
 getIds ()
 
 fields (MigrationInterface $migration=NULL)
 
 import (Row $row, array $old_destination_id_values=array())
 
- Public Member Functions inherited from PluginInspectionInterface
 getPluginId ()
 
 getPluginDefinition ()
 

Protected Member Functions

 setRollbackAction (array $id_map)
 

Protected Attributes

 $supportsRollback = FALSE
 
 $rollbackAction = MigrateIdMapInterface::ROLLBACK_DELETE
 
 $migration
 

Detailed Description

Base class for migrate destination classes.

See Also
Plugin API

Constructor & Destructor Documentation

__construct ( array  $configuration,
  $plugin_id,
  $plugin_definition,
MigrationInterface  $migration 
)

Constructs an entity destination plugin.

Parameters
array$configurationA configuration array containing information about the plugin instance.
string$plugin_idThe plugin_id for the plugin instance.
mixed$plugin_definitionThe plugin implementation definition.
MigrationInterface$migrationThe migration.

Member Function Documentation

checkRequirements ( )

{Checks if requirements for this plugin are OK.

Exceptions
\Drupal\migrate\Exception\RequirementsExceptionThrown when requirements are not met.
}

Implements RequirementsInterface.

rollback ( array  $destination_identifier)

{Delete the specified destination object from the target Drupal.

Parameters
array$destination_identifierThe ID of the destination object to delete.
}

Implements MigrateDestinationInterface.

rollbackAction ( )

{The rollback action for the last imported item.

Returns
int The MigrateIdMapInterface::ROLLBACK_ constant indicating how an imported item should be handled on rollback.
}

Implements MigrateDestinationInterface.

Referenced by EntityConfigBase\import(), EntityContentBase\import(), and DestinationBase\setRollbackAction().

Here is the caller graph for this function:

setRollbackAction ( array  $id_map)
protected

For a destination item being updated, set the appropriate rollback action.

Parameters
array$id_mapThe map row data for the item.

References DestinationBase\rollbackAction().

Referenced by EntityConfigBase\updateEntity(), and EntityContentBase\updateEntity().

Here is the call graph for this function:

Here is the caller graph for this function:

supportsRollback ( )

{Whether the destination can be rolled back or not.

Returns
bool TRUE if rollback is supported, FALSE if not.
}

Implements MigrateDestinationInterface.

Referenced by Entity\__construct().

Here is the caller graph for this function:


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