Elgg  Version master
Go to the documentation of this file.
1 <?php
9 $widget = elgg_extract('entity', $vars);
10 if (!$widget instanceof \ElggWidget) {
11  return;
12 }
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 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
Definition: theme.php:5
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145