You are here

public function AdminActionConfirm::submitForm in Calendar Systems 8.2

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

src/Form/AdminActionConfirm.php, line 32
Contains Drupal\CalendarSystems\Form\AdminSettings.

Class

AdminActionConfirm

Namespace

Drupal\calendar_systems\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $profiles = Helpers::calendar_systems_profiles();
  if (isset($profiles[$this->id])) {
    unset($profiles[$this->id]);
  }
  Helpers::calendar_systems_profiles_update($profiles);
  $form_state
    ->setRedirect('calendar_systems.admin');
}