aboutsummaryrefslogtreecommitdiff
path: root/mod/riverdashboard/endpoint/get_likes.php
blob: cc9e83aaf5a9c169c568f84f12ca642f64df3b46 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
/**
 * Grabs more "likes" to display.
 */

require_once(dirname(dirname(dirname(dirname(__FILE__)))) . "/engine/start.php");

$limit = get_input('limit', 25);
$offset = get_input('offset', 0);
$entity_guid = get_input('entity_guid');

if (!$entity = get_entity($entity_guid)) {
	exit;
}

$annotations = $entity->getAnnotations('likes', $limit, $offset);

if (is_array($annotations) && sizeof($annotations) > 0) {
	foreach($annotations as $annotation) {
		echo elgg_view_annotation($annotation, "", false);
	}
}