public function QueueManager::enqueueBatch in Warmer 2.x
Same name and namespace in other branches
- 8 src/QueueManager.php \Drupal\warmer\QueueManager::enqueueBatch()
Add a batch of warming operations to the queue.
Parameters
callable $callback: The operation to call when dequeuing.
array $ids: The list of IDs.
\Drupal\warmer\Plugin\WarmerPluginBase $warmer: The warmer plugin.
File
- src/
QueueManager.php, line 45
Class
- QueueManager
- Manage queue items and processing.
Namespace
Drupal\warmerCode
public function enqueueBatch(callable $callback, array $ids, WarmerPluginBase $warmer) {
$this->queue
->createItem(new QueueData($callback, $ids, $warmer
->getPluginId()));
$warmer
->markAsEnqueued();
}