function RouterRebuildConfirmForm::submitForm
Same name in other branches
- 4.x src/Form/RouterRebuildConfirmForm.php \Drupal\devel\Form\RouterRebuildConfirmForm::submitForm()
Overrides FormInterface::submitForm
File
-
src/
Form/ RouterRebuildConfirmForm.php, line 71
Class
- RouterRebuildConfirmForm
- Provides confirmation form for rebuilding the routes.
Namespace
Drupal\devel\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) : void {
$this->routeBuilder
->rebuild();
$this->messenger
->addMessage($this->t('The router has been rebuilt.'));
$form_state->setRedirect('<front>');
}