Elgg  Version 6.1
list.php
Go to the documentation of this file.
1 <?php
8 $items = elgg_extract('items', $vars);
9 
10 $list = '[';
11 if (is_array($items) && count($items) > 0) {
12  foreach ($items as $item) {
13  $list .= elgg_view_list_item($item, $vars);
14  $list .= ',';
15  }
16 
17  $list = rtrim($list, ',');
18 }
19 
20 $list .= ']';
21 
22 echo $list;
if(!$items) $item
Definition: delete.php:13
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:256
elgg_view_list_item($item, array $vars=[])
View an item in a list.
Definition: views.php:1232
$items
View a list of items.
Definition: list.php:19
$list
Definition: list.php:10
$vars
Definition: theme.php:5