Fast404.php in Site Audit 7
Same filename and directory in other branches
Contains \SiteAudit\Check\BestPractices\Fast404.
File
Check/BestPractices/Fast404.phpView source
<?php
/**
* @file
* Contains \SiteAudit\Check\BestPractices\Fast404.
*/
/**
* Class SiteAuditCheckBestPracticesFast404.
*/
class SiteAuditCheckBestPracticesFast404 extends SiteAuditCheckAbstract {
/**
* Implements \SiteAudit\Check\Abstract\getLabel().
*/
public function getLabel() {
return dt('Fast 404 pages');
}
/**
* Implements \SiteAudit\Check\Abstract\getDescription().
*/
public function getDescription() {
return dt('Check if enabled.');
}
/**
* Implements \SiteAudit\Check\Abstract\getResultFail().
*/
public function getResultFail() {
}
/**
* Implements \SiteAudit\Check\Abstract\getResultInfo().
*/
public function getResultInfo() {
}
/**
* Implements \SiteAudit\Check\Abstract\getResultPass().
*/
public function getResultPass() {
return dt('Fast 404 pages are enabled.');
}
/**
* Implements \SiteAudit\Check\Abstract\getResultWarn().
*/
public function getResultWarn() {
return dt('Fast 404 pages are not enabled.');
}
/**
* Implements \SiteAudit\Check\Abstract\getAction().
*/
public function getAction() {
if ($this->score == SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN) {
return dt('See https://drupal.org/node/1313592 and default.settings.php for details on how to implement.');
}
}
/**
* Implements \SiteAudit\Check\Abstract\calculateScore().
*/
public function calculateScore() {
global $conf;
if (isset($conf['404_fast_html']) && $conf['404_fast_html']) {
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}
return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
}
}
Classes
Name | Description |
---|---|
SiteAuditCheckBestPracticesFast404 | Class SiteAuditCheckBestPracticesFast404. |