Elgg
Version 6.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Notifications
MentionsEnqueueEventHandler.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Notifications
;
4
10
class
MentionsEnqueueEventHandler
{
11
15
protected
static
array
$queued
= [];
16
24
public
function
__invoke
(\
Elgg
\
Event
$event) {
25
$object
= $event->getObject();
26
if
(!
$object
instanceof \
ElggEntity
||
$object
->access_id ===
ACCESS_PRIVATE
|| in_array(
$object
->guid, self::$queued)) {
27
return
;
28
}
29
30
// prevent double enqueue
31
self::$queued[] =
$object
->guid;
32
33
_elgg_services
()->notifications->enqueueEvent(
'mentions'
,
$object
);
34
}
35
}
Elgg\Notifications\MentionsEnqueueEventHandler\$queued
static array $queued
Definition:
MentionsEnqueueEventHandler.php:15
Elgg
Definition:
ActionsService.php:3
ACCESS_PRIVATE
const ACCESS_PRIVATE
Definition:
constants.php:10
Elgg\Notifications\MentionsEnqueueEventHandler\__invoke
__invoke(\Elgg\Event $event)
Queue a mentions notification event for later handling.
Definition:
MentionsEnqueueEventHandler.php:24
Elgg\Notifications
Definition:
CreateCommentEventHandler.php:3
Elgg\Notifications\MentionsEnqueueEventHandler
Enqueue mention notifications.
Definition:
MentionsEnqueueEventHandler.php:10
$object
if($email instanceof\Elgg\Email) $object
Definition:
body.php:24
ElggEntity
Definition:
ElggEntity.php:48
_elgg_services
_elgg_services()
Get the global service provider.
Definition:
elgglib.php:351
Elgg\Event
Models an event passed to event handlers.
Definition:
Event.php:11
Generated on Wed Nov 6 2024 00:00:21 for Elgg by
1.8.11