Elgg  Version 4.3
settings.php
Go to the documentation of this file.
1 <?php
8 $widget = elgg_extract('widget', $vars);
9 if (!$widget instanceof ElggWidget) {
10  return;
11 }
12 
13 $form = elgg_view_form('widgets/save', [
14  'class' => [
15  preg_replace('/[^a-z0-9-]/i', '-', "elgg-form-widgets-save-{$widget->handler}"),
16  ],
17  'prevent_double_submit' => false,
18 ], $vars);
19 
20 if (empty($form)) {
21  return;
22 }
23 
25  'class' => 'elgg-widget-edit',
26  'id' => "widget-edit-{$widget->guid}",
27 ], $form);
$vars['type']
Definition: settings.php:5
$widget
Elgg widget edit settings.
Definition: settings.php:8
if(!$widget instanceof ElggWidget) $form
Definition: settings.php:13
elgg_view_form($action, $form_vars=[], $body_vars=[])
Definition: views.php:1064
elgg_format_element($tag_name, array $attributes=[], $text= '', array $options=[])
Format an HTML element.
Definition: output.php:135
elgg_extract($key, $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:547
elgg echo
Translates a string.
Definition: deprecated.js:530