You are here

abstract class RadioactivityQueueWorkerBase in Radioactivity 8.3

Same name and namespace in other branches
  1. 4.0.x src/Plugin/QueueWorker/RadioactivityQueueWorkerBase.php \Drupal\radioactivity\Plugin\QueueWorker\RadioactivityQueueWorkerBase

Base class for Radioactivity module queue worker plugins.

Hierarchy

Expanded class hierarchy of RadioactivityQueueWorkerBase

File

src/Plugin/QueueWorker/RadioactivityQueueWorkerBase.php, line 13

Namespace

Drupal\radioactivity\Plugin\QueueWorker
View source
abstract class RadioactivityQueueWorkerBase extends QueueWorkerBase implements ContainerFactoryPluginInterface {

  /**
   * The radioactivity.processor service.
   *
   * @var \Drupal\radioactivity\RadioactivityProcessorInterface
   */
  protected $radioactivityProcessor;

  /**
   * Constructs a RadioactivityQueueWorkerBase 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\radioactivity\RadioactivityProcessorInterface $radioactivity_processor
   *   The radioactivity.processor service.
   */
  public function __construct(array $configuration, $plugin_id, array $plugin_definition, RadioactivityProcessorInterface $radioactivity_processor) {
    parent::__construct($configuration, $plugin_id, $plugin_definition);
    $this->radioactivityProcessor = $radioactivity_processor;
  }

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
    return new static($configuration, $plugin_id, $plugin_definition, $container
      ->get('radioactivity.processor'));
  }

}

Members

Namesort descending Modifiers Type Description Overrides
PluginBase::$configuration protected property Configuration information passed into the plugin. 1
PluginBase::$pluginDefinition protected property The plugin implementation definition. 1
PluginBase::$pluginId protected property The plugin_id.
PluginBase::DERIVATIVE_SEPARATOR constant A string which is used to separate base plugin IDs from the derivative ID.
PluginBase::getBaseId public function Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface::getBaseId
PluginBase::getDerivativeId public function Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface::getDerivativeId
PluginBase::getPluginDefinition public function Gets the definition of the plugin implementation. Overrides PluginInspectionInterface::getPluginDefinition 3
PluginBase::getPluginId public function Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface::getPluginId
PluginBase::isConfigurable public function Determines if the plugin is configurable.
QueueWorkerInterface::processItem public function Works on a single queue item. 6
RadioactivityQueueWorkerBase::$radioactivityProcessor protected property The radioactivity.processor service.
RadioactivityQueueWorkerBase::create public static function Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface::create
RadioactivityQueueWorkerBase::__construct public function Constructs a RadioactivityQueueWorkerBase object. Overrides PluginBase::__construct