Elgg  Version 3.0
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 $additional_class = preg_replace('/[^a-z0-9-]/i', '-', "elgg-form-widgets-save-{$widget->handler}");
14 
15 $form = elgg_view_form('widgets/save', [
16  'class' => [
18  ],
19 ], $vars);
20 
21 if (!$form) {
22  return;
23 }
24 
25 ?>
26 
27 <div class="elgg-widget-edit" id="widget-edit-<?php echo $widget->guid; ?>">
28  <?php echo $form; ?>
29 </div>
$vars['type']
Definition: settings.php:5
if(!$widget instanceof ElggWidget) $additional_class
Definition: settings.php:13
$widget
Elgg widget edit settings.
Definition: settings.php:8
elgg_view_form($action, $form_vars=[], $body_vars=[])
Definition: views.php:1318
elgg echo
Translates a string.
Definition: languages.js:43
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:1131
$form
Definition: settings.php:15