handler; $title = $widget->getTitle(); $edit_area = ''; $can_edit = $widget->canEdit(); if ($can_edit) { $edit_area = elgg_view('object/widget/elements/settings', array( 'widget' => $widget, 'show_access' => $show_access, )); } $controls = elgg_view('object/widget/elements/controls', array( 'widget' => $widget, 'show_edit' => $edit_area != '', )); $content = elgg_view('object/widget/elements/content', $vars); $widget_id = "elgg-widget-$widget->guid"; $widget_instance = preg_replace('/[^a-z0-9-]/i', '-', "elgg-widget-instance-$handler"); if ($can_edit) { $widget_class = "elgg-state-draggable $widget_instance"; } else { $widget_class = "elgg-state-fixed $widget_instance"; } $additional_class = elgg_extract('class', $vars, ''); if ($additional_class) { $widget_class = "$widget_class $additional_class"; } $widget_header = <<

$title

$controls HEADER; $widget_body = << $content BODY; echo elgg_view_module('widget', '', $widget_body, array( 'class' => $widget_class, 'id' => $widget_id, 'header' => $widget_header, ));