Elgg
Version 6.1
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
views
json
river
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
);
$object
$object
Definition:
item.php:9
elgg_extract
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
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition:
views.php:156
$item
$item
A single element of a menu.
Definition:
item.php:9
$vars
$vars
Definition:
theme.php:5
elgg_view_exists
elgg_view_exists(string $view, string $viewtype= '', bool $recurse=true)
Returns whether the specified view exists.
Definition:
views.php:131
Generated on Wed Dec 4 2024 00:00:23 for Elgg by
1.8.11