Elgg  Version 2.3
Public Member Functions | Protected Attributes | List of all members
Elgg\Notifications\Event Class Reference
Inheritance diagram for Elgg\Notifications\Event:
Elgg\Notifications\NotificationEvent Elgg\Notifications\Elgg_Notifications_Event Elgg\Notifications\SubscriptionNotificationEvent

Public Member Functions

 __construct (ElggData $object, $action, ElggEntity $actor=null)
 Create a notification event. More...
 
 getActor ()
 Get the actor of the event. More...
 
 getActorGUID ()
 Get the GUID of the actor. More...
 
 getObject ()
 Get the object of the event. More...
 
 getAction ()
 Get the name of the action. More...
 
 getDescription ()
 Get a description of the event. More...
 
 toObject ()
 Export the notification event into a serializable object This method is mainly used for logging purposes. More...
 

Protected Attributes

 $action
 
 $object
 
 $actor
 

Detailed Description

Definition at line 16 of file Event.php.

Constructor & Destructor Documentation

Elgg\Notifications\Event::__construct ( ElggData  $object,
  $action,
ElggEntity  $actor = null 
)

Create a notification event.

Parameters
ElggData$objectThe object of the event (ElggEntity)
string$actionThe name of the action (default: create)
ElggEntity$actorThe entity that caused the event (default: logged in user)
Exceptions
InvalidArgumentException

Definition at line 38 of file Event.php.

Member Function Documentation

Elgg\Notifications\Event::getAction ( )

Get the name of the action.

Returns
string

Implements Elgg\Notifications\NotificationEvent.

Definition at line 104 of file Event.php.

Elgg\Notifications\Event::getActor ( )

Get the actor of the event.

Note
Note that the actor and the object of the notification event may have been deleted/disabled since the event was serialized and stored in the database.
Returns
ElggEntity|false|null

Implements Elgg\Notifications\NotificationEvent.

Definition at line 69 of file Event.php.

Elgg\Notifications\Event::getActorGUID ( )

Get the GUID of the actor.

Note
Note that the actor and the object of the notification event may have been deleted/disabled since the event was serialized and stored in the database.
Returns
int

Implements Elgg\Notifications\NotificationEvent.

Definition at line 82 of file Event.php.

Elgg\Notifications\Event::getDescription ( )

Get a description of the event.

Returns
string

Implements Elgg\Notifications\NotificationEvent.

Definition at line 113 of file Event.php.

Elgg\Notifications\Event::getObject ( )

Get the object of the event.

Note
Note that the actor and the object of the notification event may have been deleted/disabled since the event was serialized and stored in the database.
Returns
ElggData|false|null

Implements Elgg\Notifications\NotificationEvent.

Definition at line 95 of file Event.php.

Elgg\Notifications\Event::toObject ( )

Export the notification event into a serializable object This method is mainly used for logging purposes.

Returns
stdClass

Definition at line 127 of file Event.php.

Member Data Documentation

Elgg\Notifications\Event::$action
protected

Definition at line 21 of file Event.php.

Elgg\Notifications\Event::$actor
protected

Definition at line 27 of file Event.php.

Elgg\Notifications\Event::$object
protected

Definition at line 24 of file Event.php.


The documentation for this class was generated from the following file: