/** * ReportWorkerBase constructor. * * @param array $configuration * The configuration of the instance. * @param $plugin_id * The plugin id. * @param $plugin_definition * The plugin definition. * @param \Drupal\Core\State\StateInterface $state * The state service the instance should use. * @param \Drupal\Core\Logger\LoggerChannelFactoryInterface $logger * The logger service the instance should use. */ 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; }
/** * Constructs a new LocaleTranslation object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. * @param \Drupal\Core\Queue\QueueInterface $queue * The queue object. */ public function __construct(array $configuration, $plugin_id, array $plugin_definition, ModuleHandlerInterface $module_handler, QueueInterface $queue) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->moduleHandler = $module_handler; $this->queue = $queue; }
/** * Constructs a FeedQueueWorkerBase object. * * @param array $configuration * A configuration array containing information about the plugin instance. * @param string $plugin_id * The plugin_id for the plugin instance. * @param mixed $plugin_definition * The plugin implementation definition. */ public function __construct(array $configuration, $plugin_id, array $plugin_definition, QueueFactory $queue_factory, EventDispatcherInterface $event_dispatcher) { parent::__construct($configuration, $plugin_id, $plugin_definition); $this->queueFactory = $queue_factory; $this->setEventDispatcher($event_dispatcher); }