-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathModule.php
More file actions
46 lines (38 loc) · 1.1 KB
/
Copy pathModule.php
File metadata and controls
46 lines (38 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
<?php
namespace humhub\modules\fcmPush;
use humhub\modules\fcmPush\models\ConfigureForm;
use humhub\modules\fcmPush\services\DriverService;
use Yii;
use yii\helpers\Url;
class Module extends \humhub\components\Module
{
public string $humhubProxySenderId = '21392898126';
private ?ConfigureForm $configForm = null;
private ?DriverService $driverService = null;
/**
* @inheritdoc
*/
public function getConfigUrl()
{
return Url::to(['/fcm-push/admin']);
}
public function getConfigureForm(): ConfigureForm
{
if ($this->configForm === null) {
$this->configForm = new ConfigureForm();
$this->configForm->loadSettings();
}
return $this->configForm;
}
public function getDriverService(): DriverService
{
if ($this->driverService === null) {
$this->driverService = new DriverService($this->getConfigureForm());
}
return $this->driverService;
}
public static function registerAutoloader()
{
require Yii::getAlias('@fcm-push/vendor/autoload.php');
}
}