You are here

public function ViewsCacheBullySettingsForm::submitForm in Views cache bully 8

File

lib/Drupal/views_cache_bully/Form/ViewsCacheBullySettingsForm.php, line 95
Contains \Drupal\views_cache_bully\ViewsCacheBullySettingsForm.

Class

ViewsCacheBullySettingsForm
Configure Views Cache Bully settings for this site.

Namespace

Drupal\views_cache_bully\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $config = $this->configFactory
    ->get('views_cache_bully.settings');
  $config
    ->set('results_lifespan', $form_state['values']['views_cache_bully_results_lifespan'])
    ->set('output_lifespan', $form_state['values']['views_cache_bully_output_lifespan'])
    ->set('exempt_exposed', $form_state['values']['views_cache_bully_exempt_exposed'])
    ->set('exemptions', $form_state['values']['views_cache_bully_exemptions'])
    ->save();
  parent::submitForm($form, $form_state);
}