You are here

public function CustomTipsDeleteForm::submitForm in BeautyTips 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

beautytips_manager/src/Form/CustomTipsDeleteForm.php, line 51

Class

CustomTipsDeleteForm

Namespace

Drupal\beautytips_manager\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  beautytips_manager_delete_custom_tip($this->tip->id);
  \Drupal::cache()
    ->delete('beautytips:beautytips-ui-custom-tips');
  $form_state
    ->setRedirect('beautytips_manager.customTips');
}