1 | <?php |
||
14 | class EntityAddNotification extends Model |
||
15 | { |
||
16 | const MSG_DEFAULT = 'New notification event: «%snippet%»'; |
||
17 | const MSG_ADD_WALLPOST = 'New post on the wall: «%snippet%»'; |
||
18 | const MSG_ADD_WALLANSWER = 'New answer «%snippet%» for wall post «%post%»'; |
||
19 | const MSG_ADD_COMMENTANSWER ='New answer «%snippet%» to your comment «%post%»'; |
||
20 | |||
21 | private $_targetId; |
||
22 | |||
23 | /** |
||
24 | * EntityAddNotification constructor. Pass target user_id inside the model |
||
25 | * @param bool $targetId |
||
26 | */ |
||
27 | public function __construct($targetId) |
||
32 | |||
33 | /** |
||
34 | * Add notification for user |
||
35 | * @param string $uri |
||
36 | * @param string $msg |
||
37 | * @param array|null $vars |
||
38 | */ |
||
39 | public function add($uri, $msg = self::MSG_DEFAULT, array $vars = null) |
||
52 | } |