Elgg  Version 6.2
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

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

Definition at line 10 of file add.php.

◆ $context

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

Definition at line 8 of file add.php.

◆ $context_stack [1/2]

$context_stack = []

Definition at line 36 of file add.php.

◆ $context_stack [2/2]

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

Definition at line 42 of file add.php.

◆ $default_widgets

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

Definition at line 12 of file add.php.

◆ $guid

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

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

Definition at line 7 of file add.php.

◆ $page_owner

$page_owner = elgg_get_page_owner_entity()

Definition at line 16 of file add.php.

◆ $page_owner_guid

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

Elgg widget add action.

Definition at line 6 of file add.php.

◆ $position

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

Definition at line 11 of file add.php.

◆ $result

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

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

Definition at line 9 of file add.php.

◆ $widget

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

Definition at line 31 of file add.php.