47 $this->actor =
_elgg_services()->session_manager->getLoggedInUser();
50 $this->action =
$action ?: self::DEFAULT_ACTION_NAME;
76 return $this->actor ? $this->actor->guid : 0;
107 if (!$this->
object) {
113 $this->object->getType(),
114 $this->
object->getSubtype(),
125 $obj = new \stdClass();
127 $vars = get_object_vars($this);
129 if (is_object(
$value) && is_callable([
$value,
'toObject'])) {
130 $obj->$key =
$value->toObject();
__construct(\ElggData $object=null, string $action=null,\ElggEntity $actor=null)
Constructor.
getAction()
Get the name of the action.
toObject()
Export the notification event into a serializable object This method is mainly used for logging purpo...
getActor()
Get the actor of the event.
getObject()
Get the object of the event.
Instant notification event.
getActorGUID()
Get the GUID of the actor.
const DEFAULT_ACTION_NAME
getDescription()
Get a description of the event.
A generic class that contains shared code among , , and .
if($container instanceof ElggGroup &&$container->guid!=elgg_get_page_owner_guid()) $key
Notification event interface.
_elgg_services()
Get the global service provider.