You are here

public function DatabaseEngine::getResultFail in Site Audit 8.3

.

Overrides SiteAuditCheckBase::getResultFail

File

src/Plugin/SiteAuditCheck/DatabaseEngine.php, line 23

Class

DatabaseEngine
Provides the CronLast Check.

Namespace

Drupal\site_audit\Plugin\SiteAuditCheck

Code

public function getResultFail() {

  // If ($this->options['html']) {.
  if (TRUE) {
    $ret_val = '<table class="table table-condensed">';
    $ret_val .= '<thead><tr><th>' . $this
      ->t('Table Name') . '</th><th>' . $this
      ->t('Engine') . '</th></tr></thead>';
    $ret_val .= '<tbody>';
    foreach ($this->registry->engine_tables as $name => $engine) {
      $ret_val .= '<tr>';
      $ret_val .= '<td>' . $name . '</td>';
      $ret_val .= '<td>' . $engine . '</td>';
      $ret_val .= '</tr>';
    }
    $ret_val .= '</tbody>';
    $ret_val .= '</table>';
  }
  else {
    $ret_val = 'Table Name: Engine' . PHP_EOL;
    if (!$this->options['json']) {
      $ret_val .= str_repeat(' ', 4);
    }
    $ret_val .= '---------------------';
    foreach ($this->registry->engine_tables as $name => $engine) {
      $ret_val .= PHP_EOL;
      if (!$this->options['json']) {
        $ret_val .= str_repeat(' ', 4);
      }
      $ret_val .= "{$name}: {$engine}";
    }
  }
  return $ret_val;
}