forked from robotomarvin/Tasker
/
Notification.php
44 lines (39 loc) · 1 KB
/
Notification.php
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
<?php
namespace Models;
use Models\Base\Notification as BaseNotification;
/**
* Skeleton subclass for representing a row from the 'notification' table.
*
*
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*
*/
class Notification extends BaseNotification
{
public function getOrigin(){
$type = $this->getOriginType();
if($type == "user")
return $this->getOriginUser();
if($type == "note")
return $this->getNote();
return null;
}
public function getIcon(){
switch ($this->getType()) {
case 'info':
return '<i class="fa fa-info-circle text-info"></i>';
case 'warning':
return '<i class="fa fa-exclamation-triangle text-warning"></i>';
case 'request':
return '<i class="fa fa-bell-o text-warning"></i>';
case 'success':
return '<i class="fa fa-check text-success"></i>';
}
}
public function getLink(){
return "/";
}
}