public function MenuLinkResetForm::submitForm

Form submission handler.

Parameters

array $form: An associative array containing the structure of the form.

array $form_state: An associative array containing the current state of the form.

Overrides FormInterface::submitForm

File

drupal/core/modules/menu/lib/Drupal/menu/Form/MenuLinkResetForm.php, line 72
Contains \Drupal\menu\Form\MenuLinkResetForm.

Class

MenuLinkResetForm
Defines a confirmation form for resetting a single modified menu link.

Namespace

Drupal\menu\Form

Code

public function submitForm(array &$form, array &$form_state) {
  $new_menu_link = $this->menuLink
    ->reset();
  drupal_set_message(t('The menu link was reset to its default settings.'));
  $form_state['redirect'] = 'admin/structure/menu/manage/' . $new_menu_link->menu_name;
}