public function MenuPositionSettings::submitForm in Menu Position 8
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 ConfigFormBase::submitForm
File
- src/
Form/ MenuPositionSettings.php, line 87
Class
- MenuPositionSettings
- Class MenuPositionSettings.
Namespace
Drupal\menu_position\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('menu_position.settings')
->set('link_display', $form_state
->getValue('menu_position_active_link_display'))
->save();
// Flush appropriate menu cache.
$this->route_builder
->rebuild();
parent::submitForm($form, $form_state);
}