public function SettingsForm::submitForm in Lingotek Translation 3.4.x
Same name and namespace in other branches
- 4.0.x tests/modules/lingotek_test_config_object/src/Form/SettingsForm.php \Drupal\lingotek_test_config_object\Form\SettingsForm::submitForm()
- 3.3.x tests/modules/lingotek_test_config_object/src/Form/SettingsForm.php \Drupal\lingotek_test_config_object\Form\SettingsForm::submitForm()
- 3.5.x tests/modules/lingotek_test_config_object/src/Form/SettingsForm.php \Drupal\lingotek_test_config_object\Form\SettingsForm::submitForm()
- 3.6.x tests/modules/lingotek_test_config_object/src/Form/SettingsForm.php \Drupal\lingotek_test_config_object\Form\SettingsForm::submitForm()
- 3.7.x tests/modules/lingotek_test_config_object/src/Form/SettingsForm.php \Drupal\lingotek_test_config_object\Form\SettingsForm::submitForm()
- 3.8.x tests/modules/lingotek_test_config_object/src/Form/SettingsForm.php \Drupal\lingotek_test_config_object\Form\SettingsForm::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
- tests/
modules/ lingotek_test_config_object/ src/ Form/ SettingsForm.php, line 69
Class
- SettingsForm
- Configure Lingotek Translation Test Config Object Helper settings for this site.
Namespace
Drupal\lingotek_test_config_object\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('lingotek_test_config_object.settings');
foreach (range(1, 6) as $propertyIndex) {
$config
->set('property_' . $propertyIndex, $form_state
->getValue('property_' . $propertyIndex));
}
$config
->save();
parent::submitForm($form, $form_state);
}