RadioactivityQueueWorkerBase.php in Radioactivity 4.0.x
File
src/Plugin/QueueWorker/RadioactivityQueueWorkerBase.php
View source
<?php
namespace Drupal\radioactivity\Plugin\QueueWorker;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Queue\QueueWorkerBase;
use Drupal\radioactivity\RadioactivityProcessorInterface;
use Symfony\Component\DependencyInjection\ContainerInterface;
abstract class RadioactivityQueueWorkerBase extends QueueWorkerBase implements ContainerFactoryPluginInterface {
protected $radioactivityProcessor;
public function __construct(array $configuration, $plugin_id, array $plugin_definition, RadioactivityProcessorInterface $radioactivity_processor) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->radioactivityProcessor = $radioactivity_processor;
}
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('radioactivity.processor'));
}
}