You are here

public function CaptchaSettingsForm::clearCaptchaPlacementCacheSubmit in CAPTCHA 8

Submit callback; clear CAPTCHA placement cache.

Parameters

array $form: Form structured array.

\Drupal\Core\Form\FormStateInterface $form_state: Form state structured array.

File

src/Form/CaptchaSettingsForm.php, line 273

Class

CaptchaSettingsForm
Displays the captcha settings form.

Namespace

Drupal\captcha\Form

Code

public function clearCaptchaPlacementCacheSubmit(array $form, FormStateInterface $form_state) {
  $this->cacheBackend
    ->delete('captcha_placement_map_cache');
  $this
    ->messenger()
    ->addMessage($this
    ->t('Cleared the CAPTCHA placement cache.'));
}