public function ReferenceSettings::submitForm in Bibliography & Citation 8
Same name and namespace in other branches
- 2.0.x modules/bibcite_entity/src/Form/ReferenceSettings.php \Drupal\bibcite_entity\Form\ReferenceSettings::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/
bibcite_entity/ src/ Form/ ReferenceSettings.php, line 91
Class
- ReferenceSettings
- Common Reference settings.
Namespace
Drupal\bibcite_entity\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('bibcite_entity.reference.settings');
$config
->set('display_override.reference_page_view_mode', $form_state
->getValue([
'view_mode',
'reference_page_view_mode',
]));
$config
->set('ui_override.enable_form_override', (bool) $form_state
->getValue([
'ui_override',
'enable_form_override',
]));
$config
->set('citekey.pattern', $form_state
->getValue([
'citekey',
'citekey_pattern',
]));
$config
->save();
parent::submitForm($form, $form_state);
}