Elgg  Version 2.3
save.php
Go to the documentation of this file.
1 <?php
9 $plugin = $vars['entity'];
10 $plugin_id = $plugin->getID();
12 
13 // Do we want to show admin settings or user settings
14 $type = elgg_extract('type', $vars, '');
15 
16 if ($type != 'user') {
17  $type = '';
18 }
19 
20 if (elgg_view_exists("plugins/$plugin_id/{$type}settings")) {
21  echo elgg_view("plugins/$plugin_id/{$type}settings", $vars);
22 }
23 
24 echo '<div class="elgg-foot">';
25 echo elgg_view('input/hidden', array('name' => 'plugin_id', 'value' => $plugin_id));
26 echo elgg_view('input/hidden', array('name' => 'user_guid', 'value' => $user_guid));
27 echo elgg_view('input/submit', array('value' => elgg_echo('save')));
28 echo '</div>';
$type
Definition: save.php:14
elgg_view_exists($view, $viewtype= '', $recurse=true)
Returns whether the specified view exists.
Definition: views.php:293
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$plugin_id
Definition: save.php:16
elgg echo
Translates a string.
Definition: languages.js:48
elgg_view($view, $vars=array(), $ignore1=false, $ignore2=false, $viewtype= '')
Return a parsed view.
Definition: views.php:336
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:1375
$vars['type']
Definition: save.php:11
$plugin
Definition: save.php:17
$user_guid
Definition: save.php:18
elgg_get_logged_in_user_guid()
Return the current logged in user by guid.
Definition: sessions.php:42