You are here

public function ConfigForm::submitForm in Menu Item Role Access 8

Same name and namespace in other branches
  1. 8.2 src/Form/ConfigForm.php \Drupal\menu_item_role_access\Form\ConfigForm::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 ConfigFormBase::submitForm

File

src/Form/ConfigForm.php, line 61

Class

ConfigForm
Class ConfigForm.

Namespace

Drupal\menu_item_role_access\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $values = $form_state
    ->getValues();
  $this
    ->config('menu_item_role_access.config')
    ->set('overwrite_internal_link_target_access', $values['overwrite_internal_link_target_access'])
    ->set('inherit_parent_access', $values['inherit_parent_access'])
    ->save();
}