You are here

public function AdminSettingsForm::submitForm in Organic groups 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

og_ui/src/Form/AdminSettingsForm.php, line 144

Class

AdminSettingsForm
Provides the main administration settings form for Organic groups.

Namespace

Drupal\og_ui\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  parent::submitForm($form, $form_state);
  $this
    ->config('og.settings')
    ->set('group_manager_full_access', $form_state
    ->getValue('og_group_manager_full_access'))
    ->set('node_access_strict', $form_state
    ->getValue('og_node_access_strict'))
    ->set('delete_orphans', $form_state
    ->getValue('og_delete_orphans'))
    ->set('delete_orphans_plugin_id', $form_state
    ->getValue('og_delete_orphans_plugin_id'))
    ->save();
}