class MessageDigest in Message Digest 8
Queue worker to process sending of message subscriptions.
Plugin annotation
@QueueWorker(
id = "message_digest",
title = @Translation("Process message digests"),
cron = {"time" = 60}
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
- class \Drupal\message_digest\Plugin\QueueWorker\MessageDigest implements ContainerFactoryPluginInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
Expanded class hierarchy of MessageDigest
File
- src/
Plugin/ QueueWorker/ MessageDigest.php, line 19
Namespace
Drupal\message_digest\Plugin\QueueWorkerView source
class MessageDigest extends QueueWorkerBase implements ContainerFactoryPluginInterface {
/**
* The message digest manager.
*
* @var \Drupal\message_digest\DigestManagerInterface
*/
protected $digestManager;
/**
* Constructs the queue worker.
*
* {@inheritdoc}
*/
public function __construct(array $configuration, $plugin_id, $plugin_definition, DigestManagerInterface $digest_manager) {
parent::__construct($configuration, $plugin_id, $plugin_definition);
$this->digestManager = $digest_manager;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
return new static($configuration, $plugin_id, $plugin_definition, $container
->get('message_digest.manager'));
}
/**
* {@inheritdoc}
*/
public function processItem($data) {
$this->digestManager
->processSingleUserDigest($data['uid'], $data['notifier_id'], $data['end_time']);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
MessageDigest:: |
protected | property | The message digest manager. | |
MessageDigest:: |
public static | function |
Creates an instance of the plugin. Overrides ContainerFactoryPluginInterface:: |
|
MessageDigest:: |
public | function |
Works on a single queue item. Overrides QueueWorkerInterface:: |
|
MessageDigest:: |
public | function |
Constructs the queue worker. Overrides PluginBase:: |
|
PluginBase:: |
protected | property | Configuration information passed into the plugin. | 1 |
PluginBase:: |
protected | property | The plugin implementation definition. | 1 |
PluginBase:: |
protected | property | The plugin_id. | |
PluginBase:: |
constant | A string which is used to separate base plugin IDs from the derivative ID. | ||
PluginBase:: |
public | function |
Gets the base_plugin_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the derivative_id of the plugin instance. Overrides DerivativeInspectionInterface:: |
|
PluginBase:: |
public | function |
Gets the definition of the plugin implementation. Overrides PluginInspectionInterface:: |
3 |
PluginBase:: |
public | function |
Gets the plugin_id of the plugin instance. Overrides PluginInspectionInterface:: |
|
PluginBase:: |
public | function | Determines if the plugin is configurable. |