Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NodeTranslationMigrateSubscriber.php

function NodeTranslationMigrateSubscriber::isNodeTranslationsMigration

Helper method to check if we are migrating translated nodes.

Parameters

\Drupal\migrate\Event\EventBase $event: The migrate event.

Return value

bool True if we are migrating translated nodes, false otherwise.

2 calls to NodeTranslationMigrateSubscriber::isNodeTranslationsMigration()
NodeTranslationMigrateSubscriber::onPostImport in core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php
Set the node_translation_redirect state to enable the redirects.
NodeTranslationMigrateSubscriber::onPostRowSave in core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php
Maps the old nid to the new one in the key value collection.

File

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

Class

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

Namespace

Drupal\node\EventSubscriber

Code

protected function isNodeTranslationsMigration(EventBase $event) {
    $migration = $event->getMigration();
    $source_configuration = $migration->getSourceConfiguration();
    $destination_configuration = $migration->getDestinationConfiguration();
    return !empty($source_configuration['translations']) && $destination_configuration['plugin'] === 'entity:node';
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal