getNodeMigrateType example


  protected function getMigrations($database_state_key$drupal_version) {
    $version_tag = 'Drupal ' . $drupal_version;
    /** @var \Drupal\migrate\Plugin\MigrationInterface[] $all_migrations */
    $all_migrations = $this->getMigrationPluginManager()->createInstancesByTag($version_tag);

    // Unset the node migrations that should not run based on the type of node     // migration. That is, if this is a complete node migration then unset the     // classic node migrations and if this is a classic node migration then     // unset the complete node migrations.     $type = NodeMigrateType::getNodeMigrateType(\Drupal::database()$drupal_version);
    switch ($type) {
      case NodeMigrateType::NODE_MIGRATE_TYPE_COMPLETE:
        $patterns = '/(d' . $drupal_version . '_node:)|(d' . $drupal_version . '_node_translation:)|(d' . $drupal_version . '_node_revision:)|(d7_node_entity_translation:)/';
        break;

      case NodeMigrateType::NODE_MIGRATE_TYPE_CLASSIC:
        $patterns = '/(d' . $drupal_version . '_node_complete:)/';
        break;
    }
    foreach ($all_migrations as $key => $migrations) {
      if (preg_match($patterns$key)) {
        
Home | Imprint | This part of the site doesn't use cookies.