You are here

public function SiteAuditCheckBase::__construct in Site Audit 8.3

Constructor.

Parameters

array $registry: Aggregates data from each individual check.

bool $opt_out: If set, will not perform checks.

Overrides PluginBase::__construct

File

src/Plugin/SiteAuditCheckBase.php, line 77

Class

SiteAuditCheckBase
Base class for Site Audit Check plugins.

Namespace

Drupal\site_audit\Plugin

Code

public function __construct($configuration, $plugin_id, $plugin_definition) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if (isset($configuration['options'])) {
    $this->options = $configuration['options'];
  }
  $this->registry = $configuration['registry'];
  if (isset($configuration['opt_out']) && !empty($configuration['opt_out'])) {
    $this->optOut = TRUE;
    $this->score = SiteAuditCheckBase::AUDIT_CHECK_SCORE_INFO;
  }
  $static = FALSE;
}