You are here

public function SchemaComparisonInfoBuilder::getTablesArray in Schema 8

1 call to SchemaComparisonInfoBuilder::getTablesArray()
SchemaComparisonInfoBuilder::getInfoArray in src/Comparison/SchemaComparisonInfoBuilder.php

File

src/Comparison/SchemaComparisonInfoBuilder.php, line 35
Contains Drupal\schema\Comparison\SchemaComparisonInfoBuilder.

Class

SchemaComparisonInfoBuilder

Namespace

Drupal\schema\Comparison

Code

public function getTablesArray() {
  $info = array();

  /** @var MissingTable $table */
  foreach ($this->o
    ->getMissingTables() as $table) {
    $info['missing'][$table
      ->getModule()][$table
      ->getTableName()] = array(
      'status' => 'missing',
    );
  }

  /** @var TableComparison $table */
  foreach ($this->o
    ->getComparedTables() as $table) {
    $table_info = (new TableComparisonInfoBuilder($table))
      ->getInfoArray();
    $info[$table_info["status"]][$table
      ->getModule()][$table
      ->getTableName()] = $table_info;
  }

  /** @var ExtraTable $table */
  foreach ($this->o
    ->getExtraTables() as $table) {
    $info['extra'][] = $table
      ->getTableName();
  }
  return $info;
}