You are here

public function MailchimpListsClearCacheForm::submitForm in Mailchimp 8

Same name and namespace in other branches
  1. 2.x modules/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php \Drupal\mailchimp_lists\Form\MailchimpListsClearCacheForm::submitForm()

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/mailchimp_lists/src/Form/MailchimpListsClearCacheForm.php, line 80

Class

MailchimpListsClearCacheForm
Clear Mailchimp lists cache.

Namespace

Drupal\mailchimp_lists\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  mailchimp_get_lists([], TRUE);
  $this->messenger
    ->addStatus($this
    ->t('Mailchimp audience cache cleared.'));
}