handler; $title = $widget->getTitle(); $edit_area = ''; $can_edit = $widget->canEdit(); if ($can_edit) { $edit_area = elgg_view('layout/objects/widget/settings', array( 'widget' => $widget, 'show_access' => $show_access, )); } $controls = elgg_view('layout/objects/widget/controls', array( 'widget' => $widget, 'show_edit' => $edit_area != '', )); if (elgg_view_exists("widgets/$handler/content")) { $content = elgg_view("widgets/$handler/content", $vars); } else { elgg_deprecated_notice("widgets use content as the display view", 1.8); $content = elgg_view("widgets/$handler/view", $vars); } $widget_id = "elgg-widget-$widget->guid"; $widget_instance = "elgg-widget-instance-$handler"; $widget_class = "elgg-module elgg-module-widget"; if ($can_edit) { $widget_class .= " elgg-state-draggable $widget_instance"; } else { $widget_class .= " elgg-state-fixed $widget_instance"; } echo <<

$title

$controls
$edit_area
$content
HTML;