function NodeTranslationMigrateSubscriber::onPostImport
Same name in other branches
- 9 core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()
- 8.9.x core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::onPostImport()
- 10 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\EventSubscriberCode
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.