ContentFieldEnabled.php in Site Audit 8.3
File
src/Plugin/SiteAuditCheck/ContentFieldEnabled.php
View source
<?php
namespace Drupal\site_audit\Plugin\SiteAuditCheck;
use Drupal\site_audit\Plugin\SiteAuditCheckBase;
class ContentFieldEnabled extends SiteAuditCheckBase {
public function getResultFail() {
}
public function getResultInfo() {
return $this
->t('Field is not enabled.');
}
public function getResultPass() {
return $this
->t('Field is enabled.');
}
public function getResultWarn() {
}
public function getAction() {
}
public function calculateScore() {
if (!\Drupal::moduleHandler()
->moduleExists('field')) {
$this->abort = TRUE;
return SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO;
}
return SiteAuditCheckBase::AUDIT_CHECK_SCORE_PASS;
}
}