You are here

public function WordPressMigrationGenerator::__construct in WordPress Migrate 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

array $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/WordPressMigrationGenerator.php, line 74

Class

WordPressMigrationGenerator
Functionality to construct WordPress migrations from broad configuration settings.

Namespace

Drupal\wordpress_migrate

Code

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