You are here

public function ReportWorkerBase::__construct in Examples for Developers 8

Same name and namespace in other branches
  1. 3.x modules/cron_example/src/Plugin/QueueWorker/ReportWorkerBase.php \Drupal\cron_example\Plugin\QueueWorker\ReportWorkerBase::__construct()

ReportWorkerBase constructor.

Parameters

array $configuration: The configuration of the instance.

string $plugin_id: The plugin id.

mixed $plugin_definition: The plugin definition.

\Drupal\Core\State\StateInterface $state: The state service the instance should use.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger: The logger service the instance should use.

Overrides PluginBase::__construct

File

cron_example/src/Plugin/QueueWorker/ReportWorkerBase.php, line 49

Class

ReportWorkerBase
Provides base functionality for the ReportWorkers.

Namespace

Drupal\cron_example\Plugin\QueueWorker

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, StateInterface $state, LoggerChannelFactoryInterface $logger) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->state = $state;
  $this->logger = $logger;
}