public function MultiversionMigration::migrateContentToTemp in Multiversion 8
Parameters
\Drupal\Core\Entity\EntityTypeInterface $entity_type:
array $field_map:
Return value
\Drupal\multiversion\MultiversionMigrationInterface
Overrides MultiversionMigrationInterface::migrateContentToTemp
File
- src/
MultiversionMigration.php, line 86
Class
Namespace
Drupal\multiversionCode
public function migrateContentToTemp(EntityTypeInterface $entity_type, $field_map) {
$id = $entity_type
->id() . '__' . MultiversionManager::TO_TMP;
$definition = [
'id' => $id,
'label' => '',
'process' => $field_map,
'source' => [
'plugin' => 'multiversion',
'translations' => (bool) $entity_type
->getKey('langcode'),
],
'destination' => [
'plugin' => 'tempstore',
'translations' => (bool) $entity_type
->getKey('langcode'),
],
];
$migration = \Drupal::service('plugin.manager.migration')
->createStubMigration($definition);
$this
->executeMigration($migration);
return $this;
}