You are here

protected function NodeTranslationMigrateSubscriber::isNodeTranslationsMigration in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\NodeTranslationMigrateSubscriber::isNodeTranslationsMigration()
  2. 9 core/modules/node/src/EventSubscriber/NodeTranslationMigrateSubscriber.php \Drupal\node\EventSubscriber\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.

File

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

Class

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

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';
}