function notifications_option_set in Notifications 7
Set value from notifications_option_* variables
Parameters
$name: Variable name, will be prefixed with 'notifications_option_'
$value: New variable value
$index: Optional index if it s an array variable
$request: Set only for this page request (do not save to variables table)
1 call to notifications_option_set()
- notifications_option_array_set in ./
notifications.module - Set the same property for a family of array variables
File
- ./
notifications.module, line 1137 - Notifications module
Code
function notifications_option_set($name, $value, $index = NULL, $request = FALSE) {
// Make sure the variable is loaded into the static variable
notifications_option_get($name);
$options =& drupal_static('notifications_options', array());
if (isset($index)) {
$options[$name][$index] = $value;
}
else {
$options[$name] = $value;
}
if (!$request) {
variable_set('notifications_option_' . $name, $options[$name]);
}
}