Elgg  Version 5.1
Variables
add.php File Reference

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])
 

Variable Documentation

$column = (int) get_input('new_widget_column', 1)

Definition at line 10 of file add.php.

$context = (string) get_input('context')

Definition at line 8 of file add.php.

$context_stack = []

Definition at line 36 of file add.php.

if ($default_widgets) $context_stack[] = 'widgets'

Definition at line 42 of file add.php.

$default_widgets = (int) get_input('default_widgets', 0)

Definition at line 12 of file add.php.

if (!$page_owner) if (!elgg_can_edit_widget_layout($context)) $guid = elgg_create_widget($page_owner->guid, $handler, $context)

Definition at line 26 of file add.php.

$handler = (string) get_input('handler')

Definition at line 7 of file add.php.

$page_owner = elgg_get_page_owner_entity()

Definition at line 16 of file add.php.

$page_owner_guid = (int) get_input('page_owner_guid')

Elgg widget add action.

Definition at line 6 of file add.php.

$position = get_input('new_widget_position', 'top') === 'top' ? 0 : -1

Definition at line 11 of file add.php.

if ($context) foreach ($context_stack as $ctx) $result = elgg_view_entity($widget, ['show_access' => $show_access])

Definition at line 51 of file add.php.

$show_access = (bool) get_input('show_access', true)

Definition at line 9 of file add.php.

if ($guid===false) $widget = get_entity($guid)

Definition at line 31 of file add.php.