protected function CampaignMonitorSubscriptionManager::addtoQueue in Campaign Monitor 8.2
Adds a CampaignMonitor subscription task to the queue.
Parameters
string $function: The name of the function the queue runner should call.
array $args: The list of args to pass to the function.
Return value
mixed Unique ID if item is successfully added to the queue, FALSE otherwise.
1 call to CampaignMonitorSubscriptionManager::addtoQueue()
- CampaignMonitorSubscriptionManager::userSubscribe in src/
CampaignMonitorSubscriptionManager.php - Subscribe user to CM list in real time or by adding to the queue.
File
- src/
CampaignMonitorSubscriptionManager.php, line 555
Class
- CampaignMonitorSubscriptionManager
- Manager for Campaignmonitor subscriptions.
Namespace
Drupal\campaignmonitorCode
protected function addtoQueue($function, array $args) {
$queue = \Drupal::queue(CAMPAIGNMONITOR_QUEUE_CRON);
$queue
->createQueue();
return $queue
->createItem([
'function' => $function,
'args' => $args,
]);
}