public function SettingsForm::submitForm in Zopim Live Chat 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/
Form/ SettingsForm.php, line 76 - Contains \Drupal\zopim\Form\SettingsForm.
Class
- SettingsForm
- Provides the path admin overview form.
Namespace
Drupal\zopim\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$values = $form_state
->getValues();
$this
->config('zopim.settings')
->set('account_number', $values['account_number'])
->set('visibility', $values['visibility'])
->set('pages', _zopim_string_to_array($values['pages']))
->set('roles', array_filter($values['roles']))
->save();
parent::submitForm($form, $form_state);
}