aboutsummaryrefslogtreecommitdiff
path: root/views/default/widgets/content_stats/content.php
blob: b5ea00e18feaec5aaf945fde3519e5efc91d7e2a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php
/**
 * Content stats widget
 */

$max = 5;

$entity_stats = get_entity_statistics();
$object_stats = $entity_stats['object'];
arsort($object_stats);
$object_stats = array_slice($object_stats, 0, $max);

echo '<table class="elgg-table">';
foreach ($object_stats as $subtype => $num) {
	$name = elgg_echo("item:object:$subtype");
	echo "<tr><td>$name</td><td>$num</td></tr>";
}
echo '</table>';