You are here

function _tome_static_super_cache_form_system_performance_settings_submit in Tome 8

Submit callback to fully rebuild caches.

Parameters

array $form: The form array.

\Drupal\Core\Form\FormStateInterface $form_state: The form state.

1 string reference to '_tome_static_super_cache_form_system_performance_settings_submit'
tome_static_super_cache_form_system_performance_settings_alter in modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.module
Implements hook_form_FORM_ID_alter().

File

modules/tome_static/modules/tome_static_super_cache/tome_static_super_cache.module, line 121
Contains functions for the Tome Static Super Cache module.

Code

function _tome_static_super_cache_form_system_performance_settings_submit(array $form, FormStateInterface $form_state) {
  $GLOBALS[SuperStaticCache::FULL_REBUILD_KEY] = TRUE;
  drupal_flush_all_caches();
  \Drupal::messenger()
    ->addStatus(t('Caches fully cleared.'));
}