-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathModule.php
More file actions
35 lines (29 loc) · 891 Bytes
/
Module.php
File metadata and controls
35 lines (29 loc) · 891 Bytes
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
<?php
namespace d3yii2\d3notification;
use Yii;
use d3system\yii2\base\D3Module;
class Module extends D3Module
{
public $controllerNamespace = 'd3yii2\d3notification\controllers';
public $notificationModels = [];
/**
* get all notification modules statuses list for using in grid ass active
* @return int[]
*/
public function getActualStatusesIdList(): array
{
$list = [];
foreach ($this->notificationModels as $notificationModel) {
if (method_exists($notificationModel, 'getNotificationActualStatuses')) {
foreach ($notificationModel::getNotificationActualStatuses() as $statusId) {
$list[] = $statusId;
}
}
}
return $list;
}
public function getLabel(): string
{
return Yii::t('d3notification', 'Notifications');
}
}