Elgg  Version master
body.php
Go to the documentation of this file.
1 <?php
9 $widget = elgg_extract('entity', $vars);
10 if (!$widget instanceof \ElggWidget) {
11  return;
12 }
13 
14 $content = elgg_view('object/widget/elements/content', $vars);
15 echo elgg_format_element('div', [
16  'class' => 'elgg-widget-content',
17  'id' => "elgg-widget-content-{$widget->guid}",
18 ], $content);
$widget
Widget object body.
Definition: body.php:9
if(!$widget instanceof\ElggWidget) $content
Definition: body.php:14
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
$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