Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Namespaces | Variables
save.php File Reference

Go to the source code of this file.

Namespaces

 Elgg\Core
 Activate a plugin or plugins.
 

Variables

 $params = get_input('params')
 
 $plugin_id = get_input('plugin_id')
 
 $plugin = elgg_get_plugin_from_id($plugin_id)
 
if(!($plugin instanceof
ElggPlugin)) 
$plugin_name = $plugin->getManifest()->getName()
 
 $result = false
 
if(elgg_action_exists("$plugin_id/settings/save")) else
 

Variable Documentation

$params = get_input('params')

Definition at line 15 of file save.php.

$plugin = elgg_get_plugin_from_id($plugin_id)

Definition at line 17 of file save.php.

$plugin_id = get_input('plugin_id')

Definition at line 16 of file save.php.

if (!($plugin instanceof ElggPlugin)) $plugin_name = $plugin->getManifest()->getName()

Definition at line 24 of file save.php.

$result = false

Definition at line 26 of file save.php.

if (elgg_action_exists("$plugin_id/settings/save")) else
Initial value:
{
foreach ($params as $k => $v) {
$result = $plugin->setSetting($k, $v);
if (!$result) {
register_error(elgg_echo('plugins:settings:save:fail', array($plugin_name)));
}
}
}
system_message(elgg_echo('plugins:settings:save:ok', array($plugin_name)))
$params
Definition: save.php:15
elgg_echo($message_key, $args=array(), $language="")
Given a message key, returns an appropriately translated full-text string.
Definition: languages.php:21
$result
Definition: save.php:26
register_error($error)
Display an error on next page load.
Definition: elgglib.php:452
const REFERER
Definition: elgglib.php:2029
forward($location="", $reason= 'system')
Forward to $location.
Definition: elgglib.php:93
$plugin
Definition: save.php:17
exit
Definition: autoloader.php:34
system_message($message)
Display a system message on next page load.
Definition: elgglib.php:438
if(!($plugin instanceof ElggPlugin)) $plugin_name
Definition: save.php:24

Definition at line 31 of file save.php.