Example #1
0
<?php

gatekeeper();
$top = 25;
$user = elgg_get_logged_in_user_entity();
$objects = get_last_notifications($top);
$content = elgg_view('live_notifications/ajax', array('user' => $user, 'notifications' => $objects));
echo $content;
Example #2
0
<?php

gatekeeper();
$notifications = get_last_notifications(false);
foreach ($notifications as $item) {
    $item->delete();
}
system_message(elgg_echo('live_notifications:message:deleted_all'));