function LocaleFormHooks::formLanguageAdminEditFormAlterSubmit

Same name and namespace in other branches
  1. 11.x core/modules/locale/src/Hook/LocaleFormHooks.php \Drupal\locale\Hook\LocaleFormHooks::formLanguageAdminEditFormAlterSubmit()

Form submission handler for language_admin_edit_form().

File

core/modules/locale/src/Hook/LocaleFormHooks.php, line 160

Class

LocaleFormHooks
Form hook implementations for locale.

Namespace

Drupal\locale\Hook

Code

public function formLanguageAdminEditFormAlterSubmit(array $form, FormStateInterface $form_state) : void {
  $this->configFactory
    ->getEditable('locale.settings')
    ->set('translate_english', intval($form_state->getValue('locale_translate_english')))
    ->save();
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.