function fasttoggle_node_save in Fasttoggle 7
Same name in this branch
- 7 fasttoggle.api.php \fasttoggle_node_save()
- 7 module/fasttoggle_node/fasttoggle_node.module \fasttoggle_node_save()
Modify a node attribute and save the node.
Parameters
array $options: The array of setting options.
string $group: The setting group.
string $instance: The instance of the setting.
mixed $new_value: The new value to be set (or '[unset'] to delete the attribute.
object $object: The node to be saved.
2 string references to 'fasttoggle_node_save'
- fasttoggle_node_fasttoggle_available_links in ./
fasttoggle.api.php - Get the list of potential links for an object type.
- fasttoggle_node_fasttoggle_available_links in module/
fasttoggle_node/ fasttoggle_node.module - Implements hook_fasttoggle_labels().
File
- module/
fasttoggle_node/ fasttoggle_node.module, line 51
Code
function fasttoggle_node_save(array $options, $group, $instance, $new_value, $object) {
if ($new_value === '[unset]') {
unset($object->{$instance});
}
else {
$object->{$instance} = $new_value;
}
node_save($object);
}