You are here

public function DatabaseFragmentation::getResultWarn in Site Audit 8.3

.

Overrides SiteAuditCheckBase::getResultWarn

File

src/Plugin/SiteAuditCheck/DatabaseFragmentation.php, line 38

Class

DatabaseFragmentation
Provides the CronLast Check.

Namespace

Drupal\site_audit\Plugin\SiteAuditCheck

Code

public function getResultWarn() {
  arsort($this->registry->database_fragmentation);
  $header = [
    'table_name' => $this
      ->t('Table Name'),
    'frag_ratio' => $this
      ->t('Fragmentation Ratio'),
  ];
  $rows = [];
  foreach ($this->registry->database_fragmentation as $name => $ratio) {
    $rows[] = [
      'table_name' => $name,
      'frag_ratio' => $ratio,
    ];
  }
  return [
    '#theme' => 'table',
    '#header' => $header,
    '#rows' => $rows,
  ];
}