public function AddToHeadDeleteProfileForm::submitForm in Add To Head 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
- src/
Form/ AddToHeadDeleteProfileForm.php, line 22
Class
Namespace
Drupal\add_to_head\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
// TODO: Implement submitForm() method.
$settings = add_to_head_get_settings();
unset($settings[$this->profile['name']]);
add_to_head_set_settings($settings);
$form_state
->setRedirect('add_to_head.admin');
}