You are here

public function SiteAuditCheckExtensionsDisabled::calculateScore in Site Audit 7

Implements \SiteAudit\Check\Abstract\calculateScore().

Overrides SiteAuditCheckAbstract::calculateScore

File

Check/Extensions/Disabled.php, line 64
Contains \SiteAudit\Check\Extensions\Disabled.

Class

SiteAuditCheckExtensionsDisabled
Class SiteAuditCheckExtensionsDisabled.

Code

public function calculateScore() {
  $this->registry['extensions_disabled'] = array();
  foreach ($this->registry['extensions'] as $extension) {
    if ($extension->type == 'module' && drush_get_extension_status($extension) == 'disabled') {
      $this->registry['extensions_disabled'][] = $extension->name;
    }
  }
  if (!empty($this->registry['extensions_disabled'])) {
    return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_WARN;
  }
  return SiteAuditCheckAbstract::AUDIT_CHECK_SCORE_PASS;
}