Elgg  Version 1.9
save.php
Go to the documentation of this file.
1 <?php
9 $widget = $vars['widget'];
10 $show_access = elgg_extract('show_access', $vars, true);
11 
12 $edit_view = "widgets/$widget->handler/edit";
14 
15 $access = '';
16 if ($show_access) {
17  $access = elgg_echo('access') . ': ' . elgg_view('input/access', array(
18  'name' => 'params[access_id]',
19  'value' => $widget->access_id,
20  ));
21 }
22 
23 if (!$custom_form_section && !$access) {
24  return true;
25 }
26 
27 $hidden = elgg_view('input/hidden', array('name' => 'guid', 'value' => $widget->guid));
28 $submit = elgg_view('input/submit', array('value' => elgg_echo('save')));
29 
30 $body = <<<___END
32  <div>
33  $access
34  </div>
35  <div class="elgg-foot">
36  $hidden
37  $submit
38  </div>
39 ___END;
40 
41 echo $body;
$custom_form_section
Definition: save.php:13
if($show_access) if(!$custom_form_section &&!$access) $hidden
Definition: save.php:27
$show_access
Definition: save.php:10
$widget
Definition: save.php:26
elgg_extract($key, array $array, $default=null, $strict=true)
Checks for $array[$key] and returns its value if it exists, else returns $default.
Definition: elgglib.php:1464
fieldset div
Definition: admin.php:462
$body
Definition: save.php:30
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
elgg echo
Translates a string.
Definition: languages.js:43
elgg_view($view, $vars=array(), $bypass=false, $ignored=false, $viewtype= '')
Return a parsed view.
Definition: views.php:354
$edit_view
Definition: save.php:12
$submit
Definition: save.php:28
$vars['type']
Definition: save.php:11
$access
Definition: save.php:15