public function SiteAuditCheckExtensionsUnrecommended::getResultFail in Site Audit 8.2
Same name and namespace in other branches
- 7 Check/Extensions/Unrecommended.php \SiteAuditCheckExtensionsUnrecommended::getResultFail()
Implements \SiteAudit\Check\Abstract\getResultFail().
Overrides SiteAuditCheckAbstract::getResultFail
File
- Check/
Extensions/ Unrecommended.php, line 29 - Contains \SiteAudit\Check\Extensions\Unrecommended.
Class
- SiteAuditCheckExtensionsUnrecommended
- Class SiteAuditCheckExtensionsUnrecommended.
Code
public function getResultFail() {
$ret_val = dt('The following unrecommended modules(s) currently exist in your codebase: @list', array(
'@list' => implode(', ', array_keys($this->registry['extensions_unrec'])),
));
if (drush_get_option('detail')) {
if (drush_get_option('html')) {
$ret_val .= '<br/>';
$ret_val .= '<table class="table table-condensed">';
$ret_val .= '<thead><tr><th>' . dt('Name') . '</th><th>' . dt('Reason') . '</th></thead>';
$ret_val .= '<tbody>';
foreach ($this->registry['extensions_unrec'] as $row) {
$ret_val .= '<tr><td>' . implode('</td><td>', $row) . '</td></tr>';
}
$ret_val .= '</tbody>';
$ret_val .= '</table>';
}
else {
foreach ($this->registry['extensions_unrec'] as $row) {
$ret_val .= PHP_EOL;
if (!drush_get_option('json')) {
$ret_val .= str_repeat(' ', 6);
}
$ret_val .= '- ' . $row[0] . ': ' . $row[1];
}
}
}
return $ret_val;
}