public function SiteAuditCheckDatabaseCollation::getResultInfo in Site Audit 8.2
Same name and namespace in other branches
- 7 Check/Database/Collation.php \SiteAuditCheckDatabaseCollation::getResultInfo()
Implements \SiteAudit\Check\Abstract\getResultInfo().
Overrides SiteAuditCheckAbstract::getResultInfo
1 call to SiteAuditCheckDatabaseCollation::getResultInfo()
- SiteAuditCheckDatabaseCollation::getResultWarn in Check/
Database/ Collation.php - Implements \SiteAudit\Check\Abstract\getResultWarn().
File
- Check/
Database/ Collation.php, line 34 - Contains \SiteAudit\Check\Database\Collation.
Class
- SiteAuditCheckDatabaseCollation
- Class SiteAuditCheckDatabaseCollation.
Code
public function getResultInfo() {
if (drush_get_option('html')) {
$ret_val = '<table class="table table-condensed">';
$ret_val .= '<thead><tr><th>' . dt('Table Name') . '</th><th>' . dt('Collation') . '</th></tr></thead>';
$ret_val .= '<tbody>';
foreach ($this->registry['collation_tables'] as $name => $collation) {
$ret_val .= '<tr>';
$ret_val .= '<td>' . $name . '</td>';
$ret_val .= '<td>' . $collation . '</td>';
$ret_val .= '</tr>';
}
$ret_val .= '</tbody>';
$ret_val .= '</table>';
}
else {
$ret_val = dt('Table Name: Collation') . PHP_EOL;
if (!drush_get_option('json')) {
$ret_val .= str_repeat(' ', 4);
}
$ret_val .= '---------------------';
foreach ($this->registry['collation_tables'] as $name => $collation) {
$ret_val .= PHP_EOL;
if (!drush_get_option('json')) {
$ret_val .= str_repeat(' ', 4);
}
$ret_val .= "{$name}: {$collation}";
}
}
return $ret_val;
}