public function SearchEmbeddedForm::submitForm in Zircon Profile 8.0
Same name and namespace in other branches
- 8 core/modules/search/tests/modules/search_embedded_form/src/Form/SearchEmbeddedForm.php \Drupal\search_embedded_form\Form\SearchEmbeddedForm::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
- core/
modules/ search/ tests/ modules/ search_embedded_form/ src/ Form/ SearchEmbeddedForm.php, line 52 - Contains \Drupal\search_embedded_form\Form\SearchEmbeddedForm.
Class
- SearchEmbeddedForm
- Form controller for search_embedded_form form.
Namespace
Drupal\search_embedded_form\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$state = \Drupal::state();
$submit_count = (int) $state
->get('search_embedded_form.submit_count');
$state
->set('search_embedded_form.submit_count', $submit_count + 1);
drupal_set_message($this
->t('Test form was submitted'));
}