protected function MigrationConfigurationTrait::getSystemData in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate_drupal/src/MigrationConfigurationTrait.php \Drupal\migrate_drupal\MigrationConfigurationTrait::getSystemData()
- 9 core/modules/migrate_drupal/src/MigrationConfigurationTrait.php \Drupal\migrate_drupal\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_drupalCode
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 $e) {
    // The table might not exist for example in tests.
  }
  return $system_data;
}