You are here

protected function IteratingServiceBaseTrait::initializePluginInstances in Purge 8.3

Instantiate all enabled plugins or check that they are present.

14 calls to IteratingServiceBaseTrait::initializePluginInstances()
DiagnosticsService::count in src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php
DiagnosticsService::filter in src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php
Get checks filtered by severity.
DiagnosticsService::isSystemOnFire in src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php
Reports if any of the diagnostic checks report a SEVERITY_ERROR severity.
DiagnosticsService::isSystemShowingSmoke in src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php
Reports if any of the diagnostic checks report a SEVERITY_WARNING severity.
DiagnosticsService::next in src/Plugin/Purge/DiagnosticCheck/DiagnosticsService.php
Override to log messages when enabled.

... See full list

File

src/IteratingServiceBaseTrait.php, line 29

Class

IteratingServiceBaseTrait
Adds \Iterator logic to \Drupal\purge\ServiceInterface derivatives.

Namespace

Drupal\purge

Code

protected function initializePluginInstances() {
  if (!is_null($this->instances)) {
    return;
  }
  $this->instances = [];
  foreach ($this
    ->getPluginsEnabled() as $plugin_id) {
    $this->instances[] = $this->pluginManager
      ->createInstance($plugin_id);
  }
}