You are here

public function LingotekSettingsCommunityForm::submitForm in Lingotek Translation 3.3.x

Same name and namespace in other branches
  1. 8 src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  2. 8.2 src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  3. 4.0.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  4. 3.0.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  5. 3.1.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  6. 3.2.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  7. 3.4.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  8. 3.5.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  9. 3.6.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  10. 3.7.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::submitForm()
  11. 3.8.x src/Form/LingotekSettingsCommunityForm.php \Drupal\lingotek\Form\LingotekSettingsCommunityForm::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/LingotekSettingsCommunityForm.php, line 60

Class

LingotekSettingsCommunityForm
Configure text display settings for this page.

Namespace

Drupal\lingotek\Form

Code

public function submitForm(array &$form, FormStateInterface $form_state) {
  $form_values = $form_state
    ->getValues();
  $config = \Drupal::configFactory()
    ->getEditable('lingotek.settings');
  $config
    ->set('default.community', $form_values['community'])
    ->save();

  // update resources based on newly selected community
  $this->lingotek
    ->getResources(TRUE);
  $form_state
    ->setRedirect('lingotek.setup_defaults');
  parent::submitForm($form, $form_state);
}