function RenderExampleDemoForm::submitForm
Same name in other branches
- 4.0.x modules/render_example/src/Form/RenderExampleDemoForm.php \Drupal\render_example\Form\RenderExampleDemoForm::submitForm()
Overrides ConfigFormBase::submitForm
File
-
modules/
render_example/ src/ Form/ RenderExampleDemoForm.php, line 272
Class
- RenderExampleDemoForm
- Provides the form for toggling module features on and off.
Namespace
Drupal\render_example\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state->getValues();
$config = $this->config('render_example.settings');
$config->set('show_block', $values['render_example_show_block'])
->save();
$config->set('show_page', $values['render_example_show_page'])
->save();
$config->set('move_breadcrumbs', $values['render_example_move_breadcrumbs'])
->save();
$config->set('reverse_sidebar', $values['render_example_reverse_sidebar'])
->save();
$config->set('wrap_blocks', $values['render_example_wrap_blocks'])
->save();
parent::submitForm($form, $form_state);
}