public function MenuLinkDeleteForm::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/MenuLinkDeleteForm.php, line 58
Contains \Drupal\menu\Form\MenuLinkDeleteForm.

Class

MenuLinkDeleteForm
Defines a confirmation form for deletion of a single menu link.

Namespace

Drupal\menu\Form

Code

public function submitForm(array &$form, array &$form_state) {
  menu_link_delete($this->menuLink
    ->id());
  $t_args = array(
    '%title' => $this->menuLink->link_title,
  );
  drupal_set_message(t('The menu link %title has been deleted.', $t_args));
  watchdog('menu', 'Deleted menu link %title.', $t_args, WATCHDOG_NOTICE);
  $form_state['redirect'] = 'admin/structure/menu/manage/' . $this->menuLink->menu_name;
}