public function LinkDelete::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/shortcut/lib/Drupal/shortcut/Form/LinkDelete.php, line 65
Contains \Drupal\shortcut\Form\LinkDelete.

Class

LinkDelete
Builds the shortcut link deletion form.

Namespace

Drupal\shortcut\Form

Code

public function submitForm(array &$form, array &$form_state) {
  menu_link_delete($this->menuLink->mlid);
  $set_name = str_replace('shortcut-', '', $this->menuLink->menu_name);
  $form_state['redirect'] = 'admin/config/user-interface/shortcut/manage/' . $set_name;
  drupal_set_message(t('The shortcut %title has been deleted.', array(
    '%title' => $this->menuLink->link_title,
  )));
}