Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
numentities.php
Go to the documentation of this file.
1 <?php
9 // Get entity statistics
11 
12 if ($entity_stats) {
13  $rows = '';
14  $even_odd = null;
15  foreach ($entity_stats as $k => $entry) {
16  foreach ($entry as $a => $b) {
17 
18  // This function controls the alternating class
19  $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
20 
21  if ($a == "__base__") {
22  $a = elgg_echo("item:{$k}");
23  if (empty($a)) {
24  $a = $k;
25  }
26  } else {
27  $a = elgg_echo("item:{$k}:{$a}");
28  if (empty($a)) {
29  $a = "$k $a";
30  }
31  }
32  $rows .= <<< END
33  <tr class="{$even_odd}">
34  <td class="column-one"><b>{$a}:</b></td>
35  <td>{$b}</td>
36  </tr>
37 END;
38  }
39  }
40 
41  $title = elgg_echo('usersettings:statistics:label:numentities');
42  $content = "<table class=\"elgg-table-alt\">$rows</table>";
43 
44  echo elgg_view_module('info', $title, $content);
45 }
get_entity_statistics($owner_guid=0)
Return an array reporting the number of various entities in the system.
Definition: statistics.php:20
$even_odd
Definition: numentities.php:4
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$title
Definition: save.php:22
td
Definition: admin.css.php:63
$entity_stats
Definition: numentities.php:3
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1207
b
Definition: admin.css.php:56
$content
Set robots.txt action.
Definition: set_robots.php:6
$rows
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition: pageowner.php:22