Elgg  Version 6.2
Static Public Member Functions | Protected Member Functions | List of all members
Elgg\Notifications\CreateCommentEventHandler Class Reference

Notification Event Handler for 'object' 'comment' 'create' action. More...

Inheritance diagram for Elgg\Notifications\CreateCommentEventHandler:
Elgg\Notifications\NotificationEventHandler

Static Public Member Functions

static isConfigurableByUser ()
 Is this event configurable by the user on the notification settings page. More...
 
- Static Public Member Functions inherited from Elgg\Notifications\NotificationEventHandler
static isConfigurableForEntity (\ElggEntity $entity)
 Can this event be configured for a specific entity. More...
 

Protected Member Functions

 recipientIsCommentContainerOwner (\ElggUser $recipient)
 Tells if the recipient is the owner of the entity commented on. More...
 
 getNotificationSubject (\ElggUser $recipient, string $method)
 {Get subject for the notification.Plugins can define a subtype specific subject simply by providing a translation for the string "notification:<action>:<type>:<subtype>:subject".
Parameters
\ElggUser$recipientNotification recipient
string$methodMethod
Returns
string Notification subject in the recipient's language
} More...
 
 getNotificationSummary (\ElggUser $recipient, string $method)
 {Return the summary for a notification.
Parameters
\ElggUser$recipientNotification recipient
string$methodMethod
Returns
string
} More...
 
 getNotificationBody (\ElggUser $recipient, string $method)
 {Get body for the notification.Plugin can define a subtype specific body simply by providing a translation for the string "notification:<action>:<type>:<subtype>:body".The arguments passed into the translation are:

  1. Recipient's name
  2. Name of the user who triggered the notification
  3. Title of the content
  4. Name of the content's container
  5. The actual content (entity's 'description' field)
  6. URL to the content
Argument swapping can be used to change the order of the parameters. See http://php.net/manual/en/function.sprintf.php#example-5427
Parameters
\ElggUser$recipientNotification recipient
string$methodMethod
Returns
string Notification body in the recipient's language
} More...
 
 excludeOwnerSubscribers ()
 {Exclude the NotificationEvent object owner_guid when fetching the subscription records for this notification.
Returns
bool
See also
NotificationEventHandler::getSubscriptions();
} More...
 
- Protected Member Functions inherited from Elgg\Notifications\NotificationEventHandler
 prepareSubscriptions ()
 Returns subscriptions. More...
 
 filterMutedSubscriptions ()
 Should muted subscribers be filtered. More...
 
 getNotificationSubsciptionExclusionGUIDs ()
 Get an array of GUIDs to not get the subscription records for. More...
 
 excludeContainerSubscribers ()
 Exclude the NotificationEvent object container_guid when fetching the subscription records for this notification. More...
 
 excludeEntitySubscribers ()
 Exclude the NotificationEvent object guid when fetching the subscription records for this notification. More...
 
 sendNotifications (array $subscriptions, array $params=[])
 Sends the notifications based on subscriptions. More...
 
 sendNotification (int $guid, string $method, array $params=[])
 Send a notification to a subscriber. More...
 
 deliverNotification (Notification $notification, string $method)
 Deliver a notification. More...
 
 prepareNotification (array $params)
 Prepares a notification for delivery. More...
 
 getNotificationURL (\ElggUser $recipient, string $method)
 Returns the url related to this notification. More...
 
 getEventActor ()
 Get the acting user from the notification event. More...
 
 getEventEntity ()
 Get the entity from the notification event. More...
 
 addMuteLink ()
 Add a mute link in the email notification. More...
 

Additional Inherited Members

- Public Member Functions inherited from Elgg\Notifications\NotificationEventHandler
 __construct (NotificationEvent $event, NotificationsService $service, array $params=[])
 Constructor. More...
 
 send ()
 Process the event. More...
 
 getSubscriptions ()
 Returns subscriptions for the event. More...
 
 getMethods ()
 Returns methods to be used for this notification. More...
 
- Static Protected Member Functions inherited from Elgg\Notifications\NotificationEventHandler
static isConfigurableForUser (\ElggUser $user)
 Can this event be configured for a specific user. More...
 
static isConfigurableForGroup (\ElggGroup $group)
 Can this event be configured for a specific group. More...
 
- Protected Attributes inherited from Elgg\Notifications\NotificationEventHandler
 $event
 
 $service
 
 $params = []
 

Detailed Description

Notification Event Handler for 'object' 'comment' 'create' action.

Since
4.0

Definition at line 10 of file CreateCommentEventHandler.php.

Member Function Documentation

◆ excludeOwnerSubscribers()

Elgg\Notifications\CreateCommentEventHandler::excludeOwnerSubscribers ( )
protected

{Exclude the NotificationEvent object owner_guid when fetching the subscription records for this notification.

Returns
bool
See also
NotificationEventHandler::getSubscriptions();
}

Reimplemented from Elgg\Notifications\NotificationEventHandler.

Definition at line 67 of file CreateCommentEventHandler.php.

◆ getNotificationBody()

Elgg\Notifications\CreateCommentEventHandler::getNotificationBody ( \ElggUser  $recipient,
string  $method 
)
protected

{Get body for the notification.Plugin can define a subtype specific body simply by providing a translation for the string "notification:<action>:<type>:<subtype>:body".The arguments passed into the translation are:

  1. Recipient's name
  2. Name of the user who triggered the notification
  3. Title of the content
  4. Name of the content's container
  5. The actual content (entity's 'description' field)
  6. URL to the content
Argument swapping can be used to change the order of the parameters. See http://php.net/manual/en/function.sprintf.php#example-5427
Parameters
\ElggUser$recipientNotification recipient
string$methodMethod
Returns
string Notification body in the recipient's language
}

Reimplemented from Elgg\Notifications\NotificationEventHandler.

Definition at line 44 of file CreateCommentEventHandler.php.

◆ getNotificationSubject()

Elgg\Notifications\CreateCommentEventHandler::getNotificationSubject ( \ElggUser  $recipient,
string  $method 
)
protected

{Get subject for the notification.Plugins can define a subtype specific subject simply by providing a translation for the string "notification:<action>:<type>:<subtype>:subject".

Parameters
\ElggUser$recipientNotification recipient
string$methodMethod
Returns
string Notification subject in the recipient's language
}

Reimplemented from Elgg\Notifications\NotificationEventHandler.

Definition at line 26 of file CreateCommentEventHandler.php.

◆ getNotificationSummary()

Elgg\Notifications\CreateCommentEventHandler::getNotificationSummary ( \ElggUser  $recipient,
string  $method 
)
protected

{Return the summary for a notification.

Parameters
\ElggUser$recipientNotification recipient
string$methodMethod
Returns
string
}

Reimplemented from Elgg\Notifications\NotificationEventHandler.

Definition at line 33 of file CreateCommentEventHandler.php.

◆ isConfigurableByUser()

static Elgg\Notifications\CreateCommentEventHandler::isConfigurableByUser ( )
static

Is this event configurable by the user on the notification settings page.

Returns
bool

Reimplemented from Elgg\Notifications\NotificationEventHandler.

Definition at line 60 of file CreateCommentEventHandler.php.

◆ recipientIsCommentContainerOwner()

Elgg\Notifications\CreateCommentEventHandler::recipientIsCommentContainerOwner ( \ElggUser  $recipient)
protected

Tells if the recipient is the owner of the entity commented on.

Parameters
\ElggUser$recipientthe recipient to check
Returns
bool

Definition at line 19 of file CreateCommentEventHandler.php.


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