-
Notifications
You must be signed in to change notification settings - Fork 58
/
Quotedmem.php
55 lines (47 loc) · 1.44 KB
/
Quotedmem.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
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Handles mentioning of members whose messages has been quoted.
*
* @package ElkArte Forum
* @copyright ElkArte Forum contributors
* @license BSD http://opensource.org/licenses/BSD-3-Clause (see accompanying LICENSE.txt file)
*
* @version 2.0 dev
*
*/
namespace ElkArte\Mentions\MentionType\Notification;
use ElkArte\Mentions\MentionType\AbstractNotificationBoardAccess;
use ElkArte\Mentions\MentionType\CommonConfigTrait;
/**
* Class Quotedmem
*
* Handles mentioning of members whose messages has been quoted
*/
class Quotedmem extends AbstractNotificationBoardAccess
{
use CommonConfigTrait;
/**
* {@inheritdoc }
*/
protected static $_type = 'quotedmem';
/**
* {@inheritdoc }
*/
public function getNotificationBody($lang_data, $members)
{
if (empty($lang_data['suffix']))
{
return $this->_getNotificationStrings('', array('subject' => static::$_type, 'body' => static::$_type), $members, $this->_task);
}
else
{
$keys = array('subject' => 'notify_quotedmem_' . $lang_data['subject'], 'body' => 'notify_quotedmem_' . $lang_data['body']);
}
$replacements = array(
'ACTIONNAME' => $this->_task['source_data']['notifier_data']['name'],
'SUBJECT' => $this->_task['source_data']['subject'],
'MSGLINK' => replaceBasicActionUrl('{script_url}?msg=' . $this->_task->id_target),
);
return $this->_getNotificationStrings('notify_quotedmem', $keys, $members, $this->_task, array(), $replacements);
}
}