function NodeTranslationMigrateSubscriber::onPostImport

Same name in other branches
  1. 9 core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()
  2. 8.9.x core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()
  3. 11.x core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()

Set the node_translation_redirect state to enable the redirects.

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 mappings.

Namespace

Drupal\node\EventSubscriber

Code

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

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.