public function MenuSettingsForm::submitForm

Implements \Drupal\Core\Form\FormInterface::submitForm().

Overrides SystemConfigFormBase::submitForm

File

drupal/core/modules/menu/lib/Drupal/menu/MenuSettingsForm.php, line 63
Contains \Drupal\menu\MenuSettingsForm.

Class

MenuSettingsForm
Select the menus to be used for the main and secondary links for this site.

Namespace

Drupal\menu

Code

public function submitForm(array &$form, array &$form_state) {
  $this->configFactory
    ->get('menu.settings')
    ->set('main_links', $form_state['values']['menu_main_links_source'])
    ->set('secondary_links', $form_state['values']['menu_secondary_links_source'])
    ->save();
  parent::submitForm($form, $form_state);
}