Elgg  Version 6.0
item.php
Go to the documentation of this file.
1 <?php
8 $item = elgg_extract('item', $vars);
9 if (!$item instanceof ElggRiverItem) {
10  return;
11 }
12 
13 $output = elgg_view($item->getView(), $vars);
14 
15 if (empty($output)) {
16  $output = elgg_view($item->getView(), $vars, 'default');
17 }
18 
19 echo elgg_format_element('item', [], $output);
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:254
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
if(!$item instanceof ElggRiverItem) $output
Definition: item.php:13
$item
A single element of a menu.
Definition: item.php:9
$vars
Definition: theme.php:5
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145