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()
Object save function.
Parameters
array $options: The configuration array (the hook might want information from it).
string $group: The group to which the modified setting belongs.
string $instance: The field being modified in the object.
mixed $new_value: The new value to be saved, possibly '[unset]'.
object $object: The object to be modified and 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
- ./
fasttoggle.api.php, line 179 - Hooks provided by the Fasttoggle module.
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);
}