You are here

public function ContentSettingsForm::submitForm in Content Synchronization 8

Same name and namespace in other branches
  1. 8.2 src/Form/ContentSettingsForm.php \Drupal\content_sync\Form\ContentSettingsForm::submitForm()
  2. 3.0.x src/Form/ContentSettingsForm.php \Drupal\content_sync\Form\ContentSettingsForm::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/ContentSettingsForm.php, line 43

Class

ContentSettingsForm

Namespace

Drupal\content_sync\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $config = $this
    ->config('content_sync.settings');
  $config
    ->set('content_sync.site_uuid_override', $form_state
    ->getValue('site_uuid_override'));
  $config
    ->set('content_sync.help_menu_disabled', $form_state
    ->getValue('help_menu_disabled'));
  $config
    ->save();
  return parent::submitForm($form, $form_state);
}