EmailActivitySendAdvancedQueue.php in Open Social 10.1.x
File
modules/custom/social_advanced_queue/src/Plugin/ActivitySend/EmailActivitySendAdvancedQueue.php
View source
<?php
namespace Drupal\social_advanced_queue\Plugin\ActivitySend;
use Drupal\activity_send_email\Plugin\ActivitySend\EmailActivitySend;
use Drupal\advancedqueue\Entity\Queue;
use Drupal\advancedqueue\Job;
class EmailActivitySendAdvancedQueue extends EmailActivitySend {
public function create($entity) {
$data = [];
$data['entity_id'] = $entity
->id();
$job = Job::create('activity_send_email_worker', $data);
if ($job instanceof Job) {
$queue = Queue::load('default');
$queue
->enqueueJob($job);
}
}
}