Skip to content
Snippets Groups Projects

allow badge count to be tested on send message form

Merged Patrick Kenny requested to merge issue/firebase_php-3449611:test_badge_count into 1.0.x
@@ -63,6 +63,11 @@ final class FirebasePhpSendTestMessageForm extends FormBase {
'#maxlength' => 255,
'#required' => TRUE,
];
$form['badge_count'] = [
'#type' => 'number',
'#title' => $this->t('Badge count'),
'#required' => FALSE,
];
// Group submit handlers in an actions element with a key of "actions" so
// that it gets styled correctly, and so that other modules may add actions
@@ -89,6 +94,10 @@ final class FirebasePhpSendTestMessageForm extends FormBase {
$form_state->getValue('title'),
$form_state->getValue('message'),
$form_state->getValue('device_token'),
NULL,
NULL,
NULL,
intval($form_state->getValue('badge_count')),
);
$this->messenger()->addStatus($this->t('The test message has been sent.'));
}
Loading