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

Breadcrumb

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

function MigrationConfigurationTrait::getSystemData

Gets the system data from the system table of the source Drupal database.

Parameters

\Drupal\Core\Database\Connection $connection: Database connection to the source Drupal database.

Return value

array The system data from the system table of the source Drupal database.

1 call to MigrationConfigurationTrait::getSystemData()
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 69

Class

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

Namespace

Drupal\migrate_drupal

Code

protected function getSystemData(Connection $connection) {
    $system_data = [];
    try {
        $results = $connection->select('system', 's', [
            'fetch' => \PDO::FETCH_ASSOC,
        ])
            ->fields('s')
            ->execute();
        foreach ($results as $result) {
            $system_data[$result['type']][$result['name']] = $result;
        }
    } catch (DatabaseExceptionWrapper) {
        // The table might not exist for example in tests.
    }
    return $system_data;
}

API Navigation

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