You are here

Enabled.php in Site Audit 8.2

Same filename in this branch
  1. 8.2 Check/Watchdog/Enabled.php
  2. 8.2 Check/Views/Enabled.php
  3. 8.2 Check/Cron/Enabled.php
Same filename and directory in other branches
  1. 7 Check/Watchdog/Enabled.php

Contains \SiteAudit\Check\Watchdog\Enabled.

File

Check/Watchdog/Enabled.php
View source
<?php

/**
 * @file
 * Contains \SiteAudit\Check\Watchdog\Enabled.
 */

/**
 * Class SiteAuditCheckWatchdogEnabled.
 */
class SiteAuditCheckWatchdogEnabled extends SiteAuditCheckAbstract {

  /**
   * Implements \SiteAudit\Check\Abstract\getLabel().
   */
  public function getLabel() {
    return dt('dblog status');
  }

  /**
   * Implements \SiteAudit\Check\Abstract\getDescription().
   */
  public function getDescription() {
    return dt('Check to see if database logging is enabled');
  }

  /**
   * Implements \SiteAudit\Check\Abstract\getResultFail().
   */
  public function getResultFail() {
  }

  /**
   * Implements \SiteAudit\Check\Abstract\getResultInfo().
   */
  public function getResultInfo() {
    return dt('Database logging (dblog) is not enabled; if the site is having problems, consider enabling it for debugging.');
  }

  /**
   * Implements \SiteAudit\Check\Abstract\getResultPass().
   */
  public function getResultPass() {
    return dt('Database logging (dblog) is enabled.');
  }

  /**
   * Implements \SiteAudit\Check\Abstract\getResultWarn().
   */
  public function getResultWarn() {
  }

  /**
   * Implements \SiteAudit\Check\Abstract\getAction().
   */
  public function getAction() {
  }

  /**
   * Implements \SiteAudit\Check\Abstract\calculateScore().
   */
  public function calculateScore() {
    if (!\Drupal::moduleHandler()
      ->moduleExists('dblog')) {
      $this->abort = TRUE;
      return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_INFO;
    }
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
  }

}

Classes

Namesort descending Description
SiteAuditCheckWatchdogEnabled Class SiteAuditCheckWatchdogEnabled.