public function AlternativeFrontpageSettings::submitForm in Open Social 8
Same name and namespace in other branches
- 8.9 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.2 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.3 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.4 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.5 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.6 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.7 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 8.8 modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 10.3.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 10.0.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 10.1.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::submitForm()
- 10.2.x modules/custom/alternative_frontpage/src/Form/AlternativeFrontpageSettings.php \Drupal\alternative_frontpage\Form\AlternativeFrontpageSettings::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
- modules/
custom/ alternative_frontpage/ src/ Form/ AlternativeFrontpageSettings.php, line 149
Class
- AlternativeFrontpageSettings
- Class AlternativeFrontpageSettings.
Namespace
Drupal\alternative_frontpage\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('alternative_frontpage.settings')
->set('frontpage_for_authenticated_user', $form_state
->getValue('frontpage_for_authenticated_user'))
->save();
$this->configFactory
->getEditable('system.site')
->set('page.front', $form_state
->getValue('frontpage_for_anonymous_users'))
->save();
}