public function ViewsCacheResults::getAction in Site Audit 8.3
.
Overrides SiteAuditCheckBase::getAction
File
- src/
Plugin/ SiteAuditCheck/ ViewsCacheResults.php, line 52
Class
- ViewsCacheResults
- Provides the ViewsCacheResults Check.
Namespace
Drupal\site_audit\Plugin\SiteAuditCheckCode
public function getAction() {
if (!in_array($this->score, [
SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO,
SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS,
])) {
$steps = [
$this
->t('Go to /admin/structure/views/'),
$this
->t('Edit the View in question'),
$this
->t('Select the Display'),
$this
->t('Click Advanced'),
$this
->t('Next to Caching, click to edit.'),
$this
->t('Caching: (something other than None)'),
];
return [
'#theme' => 'item_list',
'#title' => $this
->t('Query results should be cached for at least 1 minute or use tag caching.'),
// '#description' => $this->t(),
'#items' => $steps,
'#list_type' => 'ol',
];
}
}