51 throw new \InvalidArgumentException(
'$from is not a valid \ElggEntity');
54 throw new \InvalidArgumentException(
'$to is not a valid \ElggEntity');
80 return $this->from->guid;
98 return $this->to->guid;
106 $obj = new \stdClass();
107 $vars = get_object_vars($this);
109 unset(
$vars[
'params']);
110 unset(
$vars[
'sender']);
111 unset(
$vars[
'recipient']);
112 unset(
$vars[
'subscriptions']);
113 unset(
$vars[
'action']);
114 unset(
$vars[
'object']);
116 if (is_object(
$value) && is_callable([
$value,
'toObject'])) {
117 $obj->$key =
$value->toObject();
getRecipient()
Get the recipient entity.
toObject()
Export notification.
const ORIGIN_SUBSCRIPTIONS
getRecipientGUID()
Get the recipient entity guid.
getSender()
Get the sender entity.
__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.