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

Breadcrumb

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

function MigrationConfigurationTrait::createDatabaseStateSettings

Creates the necessary state entries for SqlBase::getDatabase() to work.

The state entities created here have to exist before migration plugin instances are created so that derivers such as \Drupal\taxonomy\Plugin\migrate\D6TermNodeDeriver can access the source database.

Parameters

array $database: The source database settings.

string $drupal_version: The Drupal version.

See also

\Drupal\migrate\Plugin\migrate\source\SqlBase::getDatabase()

1 call to MigrationConfigurationTrait::createDatabaseStateSettings()
CredentialForm::setupMigrations in core/modules/migrate_drupal_ui/src/Form/CredentialForm.php
Gets and stores information for this migration in temporary store.

File

core/modules/migrate_drupal/src/MigrationConfigurationTrait.php, line 102

Class

MigrationConfigurationTrait
Configures the appropriate migrations for a given source Drupal database.

Namespace

Drupal\migrate_drupal

Code

protected function createDatabaseStateSettings(array $database, $drupal_version) {
    $database_state['key'] = 'upgrade';
    $database_state['database'] = $database;
    $database_state_key = 'migrate_drupal_' . $drupal_version;
    $state = $this->getState();
    $state->set($database_state_key, $database_state);
    $state->set('migrate.fallback_state_key', $database_state_key);
}

API Navigation

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