public function DemoDumpForm::submitForm in Demonstration site (Sandbox / Snapshot) 8
create the database.
Overrides FormInterface::submitForm
File
- src/
Form/ DemoDumpForm.php, line 74
Class
Namespace
Drupal\demo\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
if ($fileconfig = _demo_dump($form_state
->getValue([
'dump',
]))) {
\Drupal::messenger()
->addMessage(t('Snapshot %filename has been created.', [
'%filename' => $form_state
->getValue([
'dump',
'filename',
]),
]));
}
$form_state
->setRedirect('demo.manage_form');
}