class SubscriptionsQueue in Campaign Monitor 8
Provides base functionality for the Campaignmonitor Queue Workers.
Plugin annotation
@QueueWorker(
id = "campaignmonitor_local_subscriptions",
title = @Translation("Campaign Monitor local subscriptions"),
)
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
- class \Drupal\campaignmonitor_local\Plugin\QueueWorker\SubscriptionsQueue
- class \Drupal\Core\Queue\QueueWorkerBase implements QueueWorkerInterface
Expanded class hierarchy of SubscriptionsQueue
File
- modules/
campaignmonitor_local/ src/ Plugin/ QueueWorker/ SubscriptionsQueue.php, line 15
Namespace
Drupal\campaignmonitor_local\Plugin\QueueWorkerView source
class SubscriptionsQueue extends QueueWorkerBase {
/**
* {@inheritdoc}
*/
public function processItem($data) {
$uid = $data['uid'];
$mail = $data['mail'];
// Get the CM subscription.
$subs = campaignmonitor_user_get_user_subscriptions($mail);
// Merge the data record.
campaignmonitor_local_insert_user_data($uid, $subs);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
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. | |
PluginBase:: |
public | function | Constructs a \Drupal\Component\Plugin\PluginBase object. | 92 |
SubscriptionsQueue:: |
public | function |
Works on a single queue item. Overrides QueueWorkerInterface:: |