You are here

public function ProdCheckBase::__construct in Production check & Production monitor 8

Constructs a Drupal\Component\Plugin\PluginBase object.

Parameters

array $configuration: A configuration array containing information about the plugin instance.

string $plugin_id: The plugin_id for the plugin instance.

mixed $plugin_definition: The plugin implementation definition.

\Drupal\Core\Routing\RedirectDestinationInterface $destination: The redirect destination service

\Drupal\Core\Utility\LinkGeneratorInterface $generator: The link generator service

\Drupal\Core\Config\ConfigFactoryInterface $factory: The config factory service

\Drupal\Core\Datetime\DateFormatter $formatter: The date formatter service

\Drupal\Core\Extension\ModuleHandlerInterface $handler: The module handler service

Overrides PluginBase::__construct

1 call to ProdCheckBase::__construct()
ModuleList::__construct in src/Plugin/ProdCheck/Modules/ModuleList.php
DatabaseUpdates constructor.
1 method overrides ProdCheckBase::__construct()
ModuleList::__construct in src/Plugin/ProdCheck/Modules/ModuleList.php
DatabaseUpdates constructor.

File

src/Plugin/ProdCheck/ProdCheckBase.php, line 87

Class

ProdCheckBase
Base class for all the prod check plugins.

Namespace

Drupal\prod_check\Plugin\ProdCheck

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, RedirectDestinationInterface $destination, LinkGeneratorInterface $generator, ConfigFactoryInterface $factory, DateFormatter $formatter, ModuleHandlerInterface $handler) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  if (isset($configuration['processor'])) {
    $this->processor = $configuration['processor'];
  }
  $this->destination = $destination;
  $this->linkGenerator = $generator;
  $this->configFactory = $factory;
  $this->dateFormatter = $formatter;
  $this->moduleHandler = $handler;
  $this->configuration += $this
    ->defaultConfiguration();
  $this
    ->init();
}