You are here

public function DrupalMigrationGenerator::__construct in Drupal-to-Drupal data migration 8.3

Constructs a WordPress migration generator, using provided configuration.

@todo: Validate inputs (e.g., make sure post type exists). @link https://www.drupal.org/node/2742283

Parameters

$configuration: An associative array:

  • file_uri: Drupal stream wrapper of the source WordPress XML file.
  • group_id: ID of the MigrationGroup holding the generated migrations.
  • prefix: String to prefix to the IDs of generated migrations.
  • default_author: If present, username to author all imported content. If absent or empty, users will be imported from WordPress.
  • tag_vocabulary: Machine name of vocabulary to hold tags.
  • category_vocabulary: Machine name of vocabulary to hold categories.
  • [post|page]: Associative array of type-specific configuration:
    • type: Machine name of Drupal node bundle to hold content.
    • text_format: Machine name of text format for body field.

File

src/DrupalMigrationGenerator.php, line 68

Class

DrupalMigrationGenerator
Functionality to construct Drupal migrations from broad configuration settings.

Namespace

Drupal\migrate_d2d

Code

public function __construct(array $configuration) {
  $this->configuration = $configuration;
}