You are here

public function UnitDeleteMultiple::submitForm in Booking and Availability Management Tools for Drupal 8

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

modules/bat_unit/src/Form/UnitDeleteMultiple.php, line 96
Contains \Drupal\bat_unit\Form\UnitDeleteMultiple.

Class

UnitDeleteMultiple
Provides a unit deletion confirmation form.

Namespace

Drupal\bat_unit\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  if ($form_state
    ->getValue('confirm') && !empty($this->unitInfo)) {
    bat_unit_delete_multiple(array_keys($this->unitInfo));
  }
}