Elgg  Version 3.0
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 = get_input('handler')
 
 $context = get_input('context')
 
 $show_access = (bool) get_input('show_access', true)
 
 $column = (int) get_input('column', 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('column', 1)

Definition at line 10 of file add.php.

$context = get_input('context')
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 8 of file add.php.

$context_stack = []

Definition at line 35 of file add.php.

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

Definition at line 40 of file add.php.

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

Definition at line 11 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 25 of file add.php.

$handler = get_input('handler')

Definition at line 7 of file add.php.

$page_owner = elgg_get_page_owner_entity()
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 15 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.

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

Definition at line 49 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 30 of file add.php.