function merci_nodeapi in MERCI (Manage Equipment Reservations, Checkout and Inventory) 6.2
Same name and namespace in other branches
- 6 merci.module \merci_nodeapi()
Implementation of hook_nodeapi().
File
- ./
merci.module, line 921 - MERCI - Managed Equipment Reservation Checkout and Inventory
Code
function merci_nodeapi(&$node, $op, $a3 = NULL, $a4 = NULL) {
switch ($op) {
//case 'prepare': prepare and load are always called one after the other. Just need to use one.
case 'load':
// Merge in reservable items settings or else just use the default defined in the content type.
if (merci_is_merci_type($node->type)) {
return (array) merci_load_item_settings($node);
}
break;
case 'insert':
merci_node_insert($node);
break;
case 'update':
merci_node_update($node);
break;
case 'delete':
merci_node_delete($node);
break;
case 'delete revision':
merci_node_revision_delete($node);
break;
}
}