You are here

public function EntityRevision::getIds in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php \Drupal\migrate\Plugin\migrate\destination\EntityRevision::getIds()

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 value

array An array of ids.

Overrides EntityContentBase::getIds

File

core/modules/migrate/src/Plugin/migrate/destination/EntityRevision.php, line 77
Contains \Drupal\migrate\Plugin\migrate\destination\EntityRevision.

Class

EntityRevision
Plugin annotation @MigrateDestination( id = "entity_revision", deriver = "Drupal\migrate\Plugin\Derivative\MigrateEntityRevision" )

Namespace

Drupal\migrate\Plugin\migrate\destination

Code

public function getIds() {
  if ($key = $this
    ->getKey('revision')) {
    $ids[$key]['type'] = 'integer';
    return $ids;
  }
  throw new MigrateException('This entity type does not support revisions.');
}