Elgg  Version 3.0
item.php
Go to the documentation of this file.
1 <?php
8 $item = elgg_extract('item', $vars);
9 $object = $item->toObject();
10 if (elgg_view_exists($item->view, 'default')) {
11  $object->description = elgg_view('river/elements/summary', ['item' => $item], 'default');
12 }
13 
14 echo json_encode($object);
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
Definition: views.php:205
$object
Definition: item.php:9
$item
Definition: item.php:12
elgg echo
Translates a string.
Definition: languages.js:43
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1131
$vars['type']
Definition: save.php:11
elgg_view($view, $vars=[], $viewtype= '')
Return a parsed view.
Definition: views.php:246