function ModalForm::submitForm
Same name in other branches
- 3.x modules/form_api_example/src/Form/ModalForm.php \Drupal\form_api_example\Form\ModalForm::submitForm()
Overrides FormInterface::submitForm
File
-
modules/
form_api_example/ src/ Form/ ModalForm.php, line 138
Class
- ModalForm
- Implements the ModalForm form controller.
Namespace
Drupal\form_api_example\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$title = $form_state->getValue('title');
$this->messenger()
->addMessage($this->t('Submit handler: You specified a title of @title.', [
'@title' => $title,
]));
}