Skip to content
Snippets Groups Projects
Commit b1c63e15 authored by Patrick Kenny's avatar Patrick Kenny
Browse files

Merge branch 'test_badge_count' into '1.0.x'

allow badge count to be tested on send message form

See merge request !26
parents 4b384665 3366aa08
No related branches found
No related tags found
No related merge requests found
Pipeline #182633 skipped
...@@ -63,6 +63,11 @@ final class FirebasePhpSendTestMessageForm extends FormBase { ...@@ -63,6 +63,11 @@ final class FirebasePhpSendTestMessageForm extends FormBase {
'#maxlength' => 255, '#maxlength' => 255,
'#required' => TRUE, '#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 // 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 // that it gets styled correctly, and so that other modules may add actions
...@@ -89,6 +94,10 @@ final class FirebasePhpSendTestMessageForm extends FormBase { ...@@ -89,6 +94,10 @@ final class FirebasePhpSendTestMessageForm extends FormBase {
$form_state->getValue('title'), $form_state->getValue('title'),
$form_state->getValue('message'), $form_state->getValue('message'),
$form_state->getValue('device_token'), $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.')); $this->messenger()->addStatus($this->t('The test message has been sent.'));
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment