Changeset View
Changeset View
Standalone View
Standalone View
src/applications/webpush/config/PhabricatorWebpushConfigOptions.php
- This file was added.
| <?php | |||||
| final class PhabricatorWebpushConfigOptions | |||||
| extends PhabricatorApplicationConfigOptions { | |||||
| public function getName() { | |||||
| return pht('Web Push Notifications'); | |||||
| } | |||||
| public function getDescription() { | |||||
| return pht('Configure Web Push notifications settings.'); | |||||
| } | |||||
| public function getFontIcon() { | |||||
| return 'fa-bell'; | |||||
| } | |||||
| public function getGroup() { | |||||
| return 'core'; | |||||
| } | |||||
| public function getOptions() { | |||||
| return array( | |||||
| $this->newOption('webpush.enabled', 'bool', false) | |||||
| ->setBoolOptions( | |||||
| array( | |||||
| pht('Enable Web Push Notifications'), | |||||
| pht('Disable Web Push Notifications'), | |||||
| )) | |||||
| ->setSummary(pht('Enable Web Push notifications.')) | |||||
| ->setDescription( | |||||
| pht( | |||||
| 'Enable Web Push desktop or mobile browser notifications. '. | |||||
| 'For Chrome browser notifications you need to set up a project in '. | |||||
| 'https://console.developers.google.com/project and '. | |||||
| 'enable Cloud Messaging for Android API to obtain the API key.')), | |||||
| $this->newOption('webpush.gcm-sender-id', 'string', null) | |||||
| ->setLocked(true) | |||||
| ->setDescription(pht('Project ID for Google Cloud Messaging.')), | |||||
| $this->newOption('webpush.gcm-api-key', 'string', null) | |||||
| ->setHidden(true) | |||||
| ->setDescription(pht('Secret key for Google Cloud Messaging.')), | |||||
| ); | |||||
| } | |||||
| } |