Elgg  Version 5.1
settings.php
Go to the documentation of this file.
1 <?php
8 elgg_deprecated_notice('This view is no longer used and will be removed in the next major version.', '5.1');
9 
10 $widget = elgg_extract('widget', $vars);
11 if (!$widget instanceof ElggWidget) {
12  return;
13 }
14 
15 $form = elgg_view_form('widgets/save', [
16  'class' => [
17  preg_replace('/[^a-z0-9-]/i', '-', "elgg-form-widgets-save-{$widget->handler}"),
18  ],
19  'prevent_double_submit' => false,
20 ], $vars);
21 
22 if (empty($form)) {
23  return;
24 }
25 
26 echo elgg_format_element('div', [
27  'class' => 'elgg-widget-edit',
28  'id' => "widget-edit-{$widget->guid}",
29 ], $form);
$vars['type']
Definition: settings.php:5
elgg_view_form(string $action, array $form_vars=[], array $body_vars=[])
Definition: views.php:1054
elgg_deprecated_notice(string $msg, string $dep_version)
Log a notice about deprecated use of a function, view, etc.
Definition: elgglib.php:115
elgg_extract($key, $array, $default=null, bool $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:254
$widget
Definition: settings.php:10
if(!$widget instanceof ElggWidget) $form
Definition: settings.php:15
elgg_format_element(string $tag_name, array $attributes=[], string $text= '', array $options=[])
Format an HTML element.
Definition: output.php:145