You are here

function autosave_form_test_autosave_submit in Autosave Form 8

1 string reference to 'autosave_form_test_autosave_submit'
autosave_form_test_form_alter in tests/modules/autosave_form_test/autosave_form_test.module
Implements hook_form_alter().

File

tests/modules/autosave_form_test/autosave_form_test.module, line 20

Code

function autosave_form_test_autosave_submit($form, FormStateInterface $form_state) {

  /** @var \Drupal\Core\State\StateInterface $state */
  $state = \Drupal::state();
  $count = $state
    ->get('autosave_submit_count', 0);
  $state
    ->set('autosave_submit_count', ++$count);
}