Elgg  Version 1.11
content.php
Go to the documentation of this file.
1 <?php
6 $num_display = sanitize_int($vars['entity']->num_display, false);
7 // set default value for display number
8 if (!$num_display) {
9  $num_display = 8;
10 }
11 
14 arsort($object_stats);
15 $object_stats = array_slice($object_stats, 0, $num_display);
16 
17 echo '<table class="elgg-table-alt">';
18 echo '<tr><th>' . elgg_echo('widget:content_stats:type') . '</th>';
19 echo '<th>' . elgg_echo('widget:content_stats:number') . '</th></tr>';
20 foreach ($object_stats as $subtype => $num) {
21  $name = elgg_echo("item:object:$subtype");
22  echo "<tr><td>$name</td><td>$num</td></tr>";
23 }
24 echo '</table>';
25 
26 echo '<div class="mtm">';
27 echo elgg_view('output/url', array(
28  'href' => 'admin/statistics/overview',
29  'text' => elgg_echo('more'),
30  'is_trusted' => true,
31 ));
32 echo '</div>';
get_entity_statistics($owner_guid=0)
Return an array reporting the number of various entities in the system.
Definition: statistics.php:20
if($guid==elgg_get_logged_in_user_guid()) $name
Definition: delete.php:21
if(!$num_display) $entity_stats
Definition: content.php:12
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1246
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$num_display
Banned users admin widget.
Definition: content.php:6
$object_stats
Definition: content.php:13
$vars['title']
Definition: content.php:19
sanitize_int($int, $signed=true)
Sanitizes an integer for database use.
Definition: database.php:161
$subtype
Definition: river.php:12