public function OverviewForm::submitBatch in Queue UI 8.2
Process queue(s) with batch.
Parameters
\Drupal\Core\Form\FormStateInterface $form_state:
$queues:
File
- src/
Form/ OverviewForm.php, line 322
Class
- OverviewForm
- Class QueueUIOverviewForm @package Drupal\queue_ui\Form
Namespace
Drupal\queue_ui\FormCode
public function submitBatch(FormStateInterface $form_state, $queues) {
$batch = [
'title' => $this
->t('Processing queues'),
'operations' => [],
'finished' => [
'\\Drupal\\queue_ui\\QueueUIBatch',
'finish',
],
];
foreach ($queues as $queue_name) {
$batch['operations'][] = [
'\\Drupal\\queue_ui\\QueueUIBatch::step',
[
$queue_name,
],
];
}
batch_set($batch);
}