You are here

public function OverviewForm::submitBulkForm in Queue UI 8.2

Parameters

array $form:

\Drupal\Core\Form\FormStateInterface $form_state:

File

src/Form/OverviewForm.php, line 302

Class

OverviewForm
Class QueueUIOverviewForm @package Drupal\queue_ui\Form

Namespace

Drupal\queue_ui\Form

Code

public function submitBulkForm(array &$form, FormStateInterface $form_state) {
  if (in_array($form_state
    ->getValue('operation'), [
    'submitBatch',
    'submitRelease',
    'submitClear',
  ])) {
    $selected_queues = array_filter($form_state
      ->getValue('queues'));
    if (!empty($selected_queues)) {
      $this
        ->{$form_state
        ->getValue('operation')}($form_state, $selected_queues);
    }
  }
}