private static function HookImplementations::singleWarmer in Warmer 8
Same name and namespace in other branches
- 2.x src/HookImplementations.php \Drupal\warmer\HookImplementations::singleWarmer()
Executes one warmer.
Parameters
\Drupal\warmer\Plugin\WarmerPluginBase $warmer: The warmer plugin.
\Drupal\warmer\QueueManager $queue_manager: The queue manager.
1 call to HookImplementations::singleWarmer()
- HookImplementations::enqueueWarmers in src/
HookImplementations.php - Helper function to implement hook_cron.
File
- src/
HookImplementations.php, line 50
Class
- HookImplementations
- Helper functions to use in hook implementations.
Namespace
Drupal\warmerCode
private static function singleWarmer(WarmerPluginBase $warmer, QueueManager $queue_manager) {
$ids = [
NULL,
];
while ($ids = $warmer
->buildIdsBatch(end($ids))) {
$queue_manager
->enqueueBatch(static::class . '::warmBatch', $ids, $warmer);
}
}