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

Breadcrumb

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

function DrupalSqlBase::getSystemData

Retrieves all system data information from the source Drupal database.

Return value

array List of system table information keyed by type and name.

2 calls to DrupalSqlBase::getSystemData()
DrupalSqlBase::getModuleSchemaVersion in core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
Retrieves a module schema_version from the source Drupal database.
DrupalSqlBase::moduleExists in core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
Checks if a given module is enabled in the source Drupal database.

File

core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php, line 69

Class

DrupalSqlBase
A base class for source plugins using a Drupal database as a source.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

public function getSystemData() {
    if (!isset($this->systemData)) {
        $this->systemData = [];
        try {
            $results = $this->select('system', 's')
                ->fields('s')
                ->execute();
            foreach ($results as $result) {
                $this->systemData[$result['type']][$result['name']] = $result;
            }
        } catch (\Exception) {
            // The table might not exist for example in tests.
        }
    }
    return $this->systemData;
}

API Navigation

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