You are here

public function MenuLinkEditForm::submitForm in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 core/modules/menu_ui/src/Form/MenuLinkEditForm.php \Drupal\menu_ui\Form\MenuLinkEditForm::submitForm()

Form submission handler.

Parameters

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

\Drupal\Core\Form\FormStateInterface $form_state: The current state of the form.

Overrides FormInterface::submitForm

File

core/modules/menu_ui/src/Form/MenuLinkEditForm.php, line 94
Contains \Drupal\menu_ui\Form\MenuLinkEditForm.

Class

MenuLinkEditForm
Defines a generic edit form for all menu link plugin types.

Namespace

Drupal\menu_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $link = $form['#plugin_form']
    ->submitConfigurationForm($form, $form_state);
  drupal_set_message($this
    ->t('The menu link has been saved.'));
  $form_state
    ->setRedirect('entity.menu.edit_form', array(
    'menu' => $link
      ->getMenuName(),
  ));
}