You are here

public function DrupalSqlBase::getSystemData in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase::getSystemData()

Retrieves all system data information from origin system.

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
Get a module schema_version value in the source installation.
DrupalSqlBase::moduleExists in core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php
Check to see if a given module is enabled in the source installation.

File

core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php, line 66
Contains \Drupal\migrate_drupal\Plugin\migrate\source\DrupalSqlBase.

Class

DrupalSqlBase
A base source class for Drupal migrate sources.

Namespace

Drupal\migrate_drupal\Plugin\migrate\source

Code

public function getSystemData() {
  if (!isset($this->systemData)) {
    $this->systemData = array();
    try {
      $results = $this
        ->select('system', 's')
        ->fields('s')
        ->execute();
      foreach ($results as $result) {
        $this->systemData[$result['type']][$result['name']] = $result;
      }
    } catch (\Exception $e) {

      // The table might not exist for example in tests.
    }
  }
  return $this->systemData;
}