Elgg  Version 1.11
numentities.php
Go to the documentation of this file.
1 <?php
2 // Get entity statistics
4 $even_odd = "";
5 ?>
6 <table class="elgg-table-alt">
7 <?php
8 foreach ($entity_stats as $k => $entry) {
9  arsort($entry);
10  foreach ($entry as $a => $b) {
11 
12  //This function controls the alternating class
13  $even_odd = ( 'odd' != $even_odd ) ? 'odd' : 'even';
14 
15  if ($a == "__base__") {
16  $a = elgg_echo("item:{$k}");
17  if (empty($a))
18  $a = $k;
19  } else {
20  if (empty($a)) {
21  $a = elgg_echo("item:{$k}");
22  } else {
23  $a = elgg_echo("item:{$k}:{$a}");
24  }
25 
26  if (empty($a)) {
27  $a = "$k $a";
28  }
29  }
30 
31  echo <<< END
32  <tr class="{$even_odd}">
33  <td>{$a}:</td>
34  <td>{$b}</td>
35  </tr>
36 END;
37  }
38  }
39 ?>
40 </table>
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
elgg echo
Translates a string.
Definition: languages.js:43
$entity_stats
Definition: numentities.php:3
td
Definition: admin.php:63
elgg table alt tr
Definition: admin.php:420
table
Definition: admin.php:59