Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
tablelist.php
Go to the documentation of this file.
1 <?php
12 if (is_array($vars['entities'])) {
13 
14 ?>
15 
16 <table cellspacing="0" id="friendspicker-members-table">
17  <tr>
18  <?php
19  $column = 0;
20  foreach($vars['entities'] as $entity) {
21  if (!($entity instanceof ElggEntity)) {
22  $entity = get_entity($entity);
23  }
24 
25  if ($entity instanceof ElggEntity) {
26  ?>
27  <td style="width:25px;">
28  <div style="width: 25px;" class="mbl">
29  <?php echo elgg_view_entity_icon($entity, 'tiny'); ?>
30  </div>
31  </td>
32  <td style="width: 200px;" class="pas">
33  <?php echo $entity->name; ?>
34  </td>
35  <?php
36  $column++;
37  if ($column == 3) {
38  echo "</tr><tr>";
39  $column = 0;
40  }
41  }
42  }
43 
44 if ($column < 3 && $column != 0) echo "</tr>";
45  echo "</table>";
46 }
47 
48 if (isset($vars['content'])) {
49  echo $vars['content'];
50 }
$column
Definition: add.php:13
$vars['entity']
td
Definition: admin.css.php:63
table
Definition: admin.css.php:59
$entity
Definition: delete.php:7
elgg_view_entity_icon(\ElggEntity $entity, $size= 'medium', $vars=array())
View the icon of an entity.
Definition: views.php:895
get_entity($guid)
Loads and returns an entity object from a guid.
Definition: entities.php:204