public function AddToCopyForm::submitForm in Add link to copied text 8
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/
Forms/ AddToCopyForm.php, line 83
Class
- AddToCopyForm
- Provides a configuration form for addtocopy settings.
Namespace
Drupal\addtocopy\FormsCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$this
->config('addtocopy.settings')
->set('addtocopy.selector', $form_state
->getValue('addtocopy_selector'))
->set('addtocopy.minlen', $form_state
->getValue('addtocopy_minlen'))
->set('addtocopy.htmlcopytxt', $form_state
->getValue('addtocopy_htmlcopytxt'))
->set('addtocopy.addcopyfirst', $form_state
->getValue('addtocopy_addcopyfirst'))
->save();
parent::submitForm($form, $form_state);
}