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');
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 $content .= elgg_view('object/elements/full/navigation', $vars);
29 $content .= elgg_view('object/elements/full/responses', $vars);
30 
31 echo elgg_format_element('div', [
32  'class' => $class,
33  'data-guid' => $entity->guid,
34 ], $content);
$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
elgg_view(string $view, array $vars=[], string $viewtype= '')
Return a parsed view.
Definition: views.php:156
$content
Definition: full.php:25
$vars
Definition: theme.php:5
if(!$entity instanceof\ElggEntity) $class
Definition: full.php:22
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145
elgg_extract_class(array $array, array|string $existing=[], string $extract_key= 'class')
Extract class names from an array, optionally merging into a preexisting set.
Definition: elgglib.php:277