You are here

public function NodeTranslationMigrateSubscriber::onPostImport in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()
  2. 10 core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()

Set the node_translation_redirect state to enable the redirections.

Parameters

\Drupal\migrate\Event\MigrateImportEvent $event: The migrate import event.

File

core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php, line 95

Class

NodeTranslationMigrateSubscriber
Creates a key value collection for migrated node translation redirections.

Namespace

Drupal\node\EventSubscriber

Code

public function onPostImport(MigrateImportEvent $event) {
  if ($this
    ->isNodeTranslationsMigration($event)) {
    $this->state
      ->set('node_translation_redirect', TRUE);
  }
}