canEdit()) { $guid = elgg_create_widget($owner->getGUID(), $handler, $context); if ($guid) { $widget = get_entity($guid); // position the widget $widget->move($column, 0); // send widget html for insertion echo elgg_view_entity($widget, array('show_access' => $show_access)); //system_message(elgg_echo('widgets:add:success')); forward(REFERER); } } } register_error(elgg_echo('widgets:add:failure')); forward(REFERER);