Elgg  Version 1.9
Notification.php
Go to the documentation of this file.
1 <?php
11  protected $from;
12 
14  protected $to;
15 
17  public $summary;
18 
20  public $subject;
21 
23  public $body;
24 
26  public $language;
27 
29  public $params;
30 
43  public function __construct(ElggEntity $from, ElggEntity $to, $language, $subject, $body, $summary = '', array $params = array()) {
44  if (!$from) {
45  throw new InvalidArgumentException('$from is not a valid ElggEntity');
46  }
47  if (!$to) {
48  throw new InvalidArgumentException('$to is not a valid ElggEntity');
49  }
50  $this->from = $from;
51  $this->to = $to;
52  $this->language = $language;
53  $this->subject = $subject;
54  $this->body = $body;
55  $this->summary = $summary;
56  $this->params = $params;
57  }
58 
64  public function getSender() {
65  return $this->from;
66  }
67 
73  public function getSenderGUID() {
74  return $this->from->guid;
75  }
76 
82  public function getRecipient() {
83  return $this->to;
84  }
85 
91  public function getRecipientGUID() {
92  return $this->to->guid;
93  }
94 }
getSender()
Get the sender entity.
body
Definition: admin.php:36
getRecipient()
Get the recipient entity.
getRecipientGUID()
Get the recipient entity guid.
__construct(ElggEntity $from, ElggEntity $to, $language, $subject, $body, $summary= '', array $params=array())
Create a notification.
getSenderGUID()
Get the sender entity guid.
$CONFIG language
The current language for either the site or the user.
Definition: config.php:108