You are here

public function MenuPerRoleAdminSettings::submitForm in Menu Per Role 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/MenuPerRoleAdminSettings.php, line 151

Class

MenuPerRoleAdminSettings
Menu Per Role administration form.

Namespace

Drupal\menu_per_role\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) : void {
  $this
    ->config('menu_per_role.settings')
    ->set('admin_bypass_access_front', $form_state
    ->getValue('admin_bypass_access_front'))
    ->set('admin_bypass_access_admin', $form_state
    ->getValue('admin_bypass_access_admin'))
    ->set('hide_show', $form_state
    ->getValue('hide_show'))
    ->set('hide_on_content', $form_state
    ->getValue('hide_on_content'))
    ->save();
  parent::submitForm($form, $form_state);
}