Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
if(!$num_display) $entity_stats
Definition: content.php:12
$subtype
Definition: delete.php:28
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$num_display
Banned users admin widget.
Definition: content.php:6
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1310
$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:180