|
Elgg
Version master
|
Go to the source code of this file.
Variables | |
| $page_owner_guid = (int) get_input('page_owner_guid') | |
| Elgg widget add action. More... | |
| $handler = (string) get_input('handler') | |
| $context = (string) get_input('context') | |
| $show_access = (bool) get_input('show_access', true) | |
| $column = (int) get_input('new_widget_column', 1) | |
| $position = get_input('new_widget_position', 'top') === 'top' ? 0 : -1 | |
| $default_widgets = (int) get_input('default_widgets', 0) | |
| $page_owner = elgg_get_page_owner_entity() | |
| if(! $page_owner) if(!elgg_can_edit_widget_layout($context)) | $guid = elgg_create_widget($page_owner->guid, $handler, $context) |
| if($guid===false) | $widget = get_entity($guid) |
| $context_stack = [] | |
| if($default_widgets) | $context_stack [] = 'widgets' |
| if($context) foreach($context_stack as $ctx) | $result = elgg_view_entity($widget, ['show_access' => $show_access]) |
| if (! $page_owner) if (!elgg_can_edit_widget_layout( $context)) $guid = elgg_create_widget($page_owner->guid, $handler, $context) |
| $page_owner = elgg_get_page_owner_entity() |
| $page_owner_guid = (int) get_input('page_owner_guid') |
| $position = get_input('new_widget_position', 'top') === 'top' ? 0 : -1 |
| if ( $context) foreach ( $context_stack as $ctx) $result = elgg_view_entity($widget, ['show_access' => $show_access]) |
| if ( $guid===false) $widget = get_entity($guid) |