public function ConfigurationForm::submitForm in Firebase Push Notification (FCM) 8
Same name and namespace in other branches
- 3.0.x src/Form/ConfigurationForm.php \Drupal\firebase\Form\ConfigurationForm::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/ ConfigurationForm.php, line 66
Class
- ConfigurationForm
- Implements Firebase API configuration.
Namespace
Drupal\firebase\FormCode
public function submitForm(array &$form, FormStateInterface $form_state) {
$config = $this
->config('firebase.settings');
$config
->set('server_key', $form_state
->getValue('server_key'))
->set('sender_id', $form_state
->getValue('sender_id'))
->save();
parent::submitForm($form, $form_state);
}