class EmailActivitySendAdvancedQueue in Open Social 10.1.x
Same name and namespace in other branches
- 10.3.x modules/custom/social_advanced_queue/src/Plugin/ActivitySend/EmailActivitySendAdvancedQueue.php \Drupal\social_advanced_queue\Plugin\ActivitySend\EmailActivitySendAdvancedQueue
- 10.2.x modules/custom/social_advanced_queue/src/Plugin/ActivitySend/EmailActivitySendAdvancedQueue.php \Drupal\social_advanced_queue\Plugin\ActivitySend\EmailActivitySendAdvancedQueue
Ensures the'EmailActivitySend' activity action uses Advanced Queue Jobs.
Hierarchy
- class \Drupal\Component\Plugin\PluginBase implements DerivativeInspectionInterface, PluginInspectionInterface
- class \Drupal\activity_send\Plugin\ActivitySendBase implements ActivitySendInterface
- class \Drupal\activity_send_email\Plugin\ActivitySend\EmailActivitySend
- class \Drupal\social_advanced_queue\Plugin\ActivitySend\EmailActivitySendAdvancedQueue
- class \Drupal\activity_send_email\Plugin\ActivitySend\EmailActivitySend
- class \Drupal\activity_send\Plugin\ActivitySendBase implements ActivitySendInterface
Expanded class hierarchy of EmailActivitySendAdvancedQueue
1 file declares its use of EmailActivitySendAdvancedQueue
- social_advanced_queue.module in modules/
custom/ social_advanced_queue/ social_advanced_queue.module - Module file for Social Advanced Queue.
File
- modules/
custom/ social_advanced_queue/ src/ Plugin/ ActivitySend/ EmailActivitySendAdvancedQueue.php, line 12
Namespace
Drupal\social_advanced_queue\Plugin\ActivitySendView source
class EmailActivitySendAdvancedQueue extends EmailActivitySend {
/**
* {@inheritdoc}
*/
public function create($entity) {
$data = [];
$data['entity_id'] = $entity
->id();
// Create a new Email Job and add to the "default" queue using
// advanced queue API instead of SocialSendEmails default Core Queue.
$job = Job::create('activity_send_email_worker', $data);
if ($job instanceof Job) {
$queue = Queue::load('default');
$queue
->enqueueJob($job);
}
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EmailActivitySendAdvancedQueue:: |
public | function |
Create a new item in queue on the action with some logic behind it. Overrides EmailActivitySend:: |
|
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:: |
2 |
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. | 98 |