Elgg  Version master
full.php
Go to the documentation of this file.
1 <?php
17 $entity = elgg_extract('entity', $vars);
18 if (!$entity instanceof ElggEntity) {
19  return;
20 }
21 
22 $class = elgg_extract_class($vars, ['elgg-listing-full', 'elgg-content']);
23 unset($vars['class']);
24 
25 $content = elgg_view('object/elements/full/header', $vars);
26 $content .= elgg_view('object/elements/full/body', $vars);
27 $content .= elgg_view('object/elements/full/attachments', $vars);
28 if (elgg_extract('show_navigation', $vars, false)) {
29  $content .= elgg_view('object/elements/full/navigation', $vars);
30 }
31 
32 $content .= elgg_view('object/elements/full/responses', $vars);
33 
34 echo elgg_format_element('div', [
35  'class' => $class,
36  'data-guid' => $entity->guid,
37 ], $content);
elgg_extract_class(array $array, $existing=[], $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:276
$entity
Object full view.
Definition: full.php:17
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
$content
Definition: full.php:25
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
if(!$entity instanceof ElggEntity) $class
Definition: full.php:22
$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