interface MigrateDestinationInterface in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/migrate/src/Plugin/MigrateDestinationInterface.php \Drupal\migrate\Plugin\MigrateDestinationInterface
Destinations are responsible for persisting source data into the destination Drupal.
Hierarchy
- interface \Drupal\Component\Plugin\PluginInspectionInterface
- interface \Drupal\migrate\Plugin\MigrateDestinationInterface
Expanded class hierarchy of MigrateDestinationInterface
All classes that implement MigrateDestinationInterface
See also
\Drupal\migrate\Plugin\destination\DestinationBase
\Drupal\migrate\Plugin\MigrateDestinationPluginManager
\Drupal\migrate\Annotation\MigrateDestination
Related topics
2 files declare their use of MigrateDestinationInterface
- DestinationBase.php in core/
modules/ migrate/ src/ Plugin/ migrate/ destination/ DestinationBase.php - Contains \Drupal\migrate\Plugin\migrate\destination\DestinationBase.
- MigrationTest.php in core/
modules/ migrate/ tests/ src/ Unit/ MigrationTest.php - Contains \Drupal\Tests\migrate\Unit\MigrationTest.
File
- core/
modules/ migrate/ src/ Plugin/ MigrateDestinationInterface.php, line 25 - Contains \Drupal\migrate\Plugin\MigrateDestinationInterface.
Namespace
Drupal\migrate\PluginView source
interface MigrateDestinationInterface extends PluginInspectionInterface {
/**
* Get the destination ids.
*
* To support MigrateIdMap maps, derived destination classes should return
* schema field definition(s) corresponding to the primary key of the
* destination being implemented. These are used to construct the destination
* key fields of the map table for a migration using this destination.
*
* @return array
* An array of ids.
*/
public function getIds();
/**
* Returns an array of destination fields.
*
* Derived classes must implement fields(), returning a list of available
* destination fields.
*
* @todo Review the cases where we need the Migration parameter,
* can we avoid that?
*
* @param \Drupal\migrate\Entity\MigrationInterface $migration
* (optional) the migration containing this destination.
*
* @return array
* - Keys: machine names of the fields
* - Values: Human-friendly descriptions of the fields.
*/
public function fields(MigrationInterface $migration = NULL);
/**
* Import the row.
*
* Derived classes must implement import(), to construct one new object
* (pre-populated) using ID mappings in the Migration.
*
* @param \Drupal\migrate\Row $row
* The row object.
* @param array $old_destination_id_values
* The old destination ids.
*
* @return mixed
* The entity id or an indication of success.
*/
public function import(Row $row, array $old_destination_id_values = array());
/**
* Delete the specified destination object from the target Drupal.
*
* @param array $destination_identifier
* The ID of the destination object to delete.
*/
public function rollback(array $destination_identifier);
/**
* Whether the destination can be rolled back or not.
*
* @return bool
* TRUE if rollback is supported, FALSE if not.
*/
public function supportsRollback();
/**
* The rollback action for the last imported item.
*
* @return int
* The MigrateIdMapInterface::ROLLBACK_ constant indicating how an imported
* item should be handled on rollback.
*/
public function rollbackAction();
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MigrateDestinationInterface:: |
public | function | Returns an array of destination fields. | 9 |
MigrateDestinationInterface:: |
public | function | Get the destination ids. | 10 |
MigrateDestinationInterface:: |
public | function | Import the row. | 10 |
MigrateDestinationInterface:: |
public | function | Delete the specified destination object from the target Drupal. | 1 |
MigrateDestinationInterface:: |
public | function | The rollback action for the last imported item. | 1 |
MigrateDestinationInterface:: |
public | function | Whether the destination can be rolled back or not. | 1 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 2 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |