Elgg  Version 1.11
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 
45 }
get_entity_statistics($owner_guid=0)
Return an array reporting the number of various entities in the system.
Definition: statistics.php:20
elgg_view_module($type, $title, $body, array $vars=array())
Wrapper function for the module display pattern.
Definition: views.php:1217
$even_odd
Definition: numentities.php:4
$title
Definition: save.php:24
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
b
Definition: admin.php:56
elgg echo
Translates a string.
Definition: languages.js:43
$entity_stats
Definition: numentities.php:3
td
Definition: admin.php:63
$content
Set robots.txt action.
Definition: set_robots.php:6
$rows
elgg table alt tr
Definition: admin.php:420
elgg_get_page_owner_guid($guid=0)
Gets the guid of the entity that owns the current page.
Definition: pageowner.php:18