public function ParagraphBlocksSettingsForm::submitForm in Paragraph blocks 3.x
Same name and namespace in other branches
- 8.2 src/Form/ParagraphBlocksSettingsForm.php \Drupal\paragraph_blocks\Form\ParagraphBlocksSettingsForm::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
- src/
Form/ ParagraphBlocksSettingsForm.php, line 45
Class
- ParagraphBlocksSettingsForm
- Form for Paragraph Blocks settings.
Namespace
Drupal\paragraph_blocks\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$config = $this
->config('paragraph_blocks.settings');
$config
->set('max_cardinality', $form_state
->getValue('max_cardinality'));
$config
->save();
}