Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
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
$submit
Definition: save.php:12
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$show_access
Definition: save.php:10
$widget
Definition: save.php:29
$body
Definition: save.php:30
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:342
$edit_view
Definition: save.php:12
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:1310
$hidden
Definition: save.php:13
$vars['type']
Definition: save.php:11
$access
Definition: save.php:15