public function WhatsappshareForm::submitForm in Whatsapp Share 8
Same name and namespace in other branches
- 4.0.x src/Form/WhatsappshareForm.php \Drupal\whatsappshare\Form\WhatsappshareForm::submitForm()
- 1.0.x src/Form/WhatsappshareForm.php \Drupal\whatsappshare\Form\WhatsappshareForm::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/ WhatsappshareForm.php, line 73 - Contains Drupal\whatsappshare\Form\WhatsappshareForm.
Class
Namespace
Drupal\whatsappshare\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
parent::submitForm($form, $form_state);
$this
->config('whatsappshare.adminsettings')
->set('whatsappshare_button_text', $form_state
->getValue('whatsappshare_button_text'))
->set('whatsappshare_button_size', $form_state
->getValue('whatsappshare_button_size'))
->set('whatsappshare_sharing_text', $form_state
->getValue('whatsappshare_sharing_text'))
->set('whatsappshare_sharing_location', $form_state
->getValue('whatsappshare_sharing_location'))
->save();
}