casetracker_basic.install in Case Tracker 7
Same filename and directory in other branches
Install, update and uninstall functions for the casetracker module.
File
casetracker_basic.installView source
<?php
/**
* @file
* Install, update and uninstall functions for the casetracker module.
*
*/
/**
* Implements hook_install().
*/
function casetracker_basic_install() {
// Ensure the node type is available.
node_types_rebuild();
$types = node_type_get_types();
node_add_body_field($types['casetracker_basic_project'], 'Description');
node_add_body_field($types['casetracker_basic_case'], 'Description');
}
/**
* Implements hook_uninstall().
*/
function casetracker_basic_uninstall() {
db_delete('node')
->condition('type', 'casetracker_basic_project')
->execute();
db_delete('node')
->condition('type', 'casetracker_basic_case')
->execute();
db_delete('node_type')
->condition('type', 'casetracker_basic_project')
->execute();
db_delete('node_type')
->condition('type', 'casetracker_basic_case')
->execute();
}
Functions
Name | Description |
---|---|
casetracker_basic_install | Implements hook_install(). |
casetracker_basic_uninstall | Implements hook_uninstall(). |