Elgg  Version 2.2
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
elgg forward
Meant to mimic the php forward() function by simply redirecting the user to another page...
Definition: elgglib.js:425
const REFERER
Definition: elgglib.php:2029
elgg system_message
Wrapper function for system_messages.
Definition: elgglib.js:390
elgg register_error
Wrapper function for system_messages.
Definition: elgglib.js:399
$plugin
Definition: save.php:17
exit
Definition: autoloader.php:34
if(!($plugin instanceof ElggPlugin)) $plugin_name
Definition: save.php:24

Definition at line 31 of file save.php.