public function SiteAuditCheckViewsCacheOutput::getAction in Site Audit 8.2
Same name and namespace in other branches
- 7 Check/Views/CacheOutput.php \SiteAuditCheckViewsCacheOutput::getAction()
Implements \SiteAudit\Check\Abstract\getAction().
Overrides SiteAuditCheckAbstract::getAction
File
- Check/
Views/ CacheOutput.php, line 59 - Contains \SiteAudit\Check\Views\CacheOutput.
Class
- SiteAuditCheckViewsCacheOutput
- Class SiteAuditCheckViewsCacheOutput.
Code
public function getAction() {
if (!in_array($this->score, array(
SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO,
SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS,
))) {
$ret_val = dt('Rendered output should be cached for as long as possible (if the query changes, the output will be refreshed).');
if (drush_get_option('detail')) {
$steps = array(
dt('Go to /admin/structure/views/'),
dt('Edit the View in question'),
dt('Select the Display'),
dt('Click Advanced'),
dt('Next to Caching, click to edit.'),
dt('Caching: (something other than None)'),
);
if (drush_get_option('html') == TRUE) {
$ret_val .= '<ol><li>' . implode('</li><li>', $steps) . '</li></ol>';
}
else {
foreach ($steps as $step) {
$ret_val .= PHP_EOL;
if (!drush_get_option('json')) {
$ret_val .= str_repeat(' ', 8);
}
$ret_val .= '- ' . $step;
}
}
}
return $ret_val;
}
}