-
Notifications
You must be signed in to change notification settings - Fork 0
/
{{content_type}}.install
66 lines (52 loc) · 1.18 KB
/
{{content_type}}.install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Implements hook_requirements($phase)
*/
function {{content_type}}requirements($phase){
$requirements = array();
$t = get_t();
switch ($phase) {
case 'install':
//Place any installation requirements here
break;
}
return $requirements;
}
/**
* Implememnts hook_install()
*/
function {{content_type}}install(){
node_types_rebuild();
$types = node_type_get_types();
$t = get_t();
// HOOK INTO ADDITIONAL INSTALLATION ACTIONS
}
/**
* Implements hook_enable()
*/
function {{content_type}}enable(){
node_types_rebuild();
$types = node_type_get_types();
$t = get_t();
//HOOK INTO MODULE ENABLE ACTIONS
}
/**
* Implememnts hook_uninstall()
*/
function {{content_type}}uninstall(){
node_types_rebuild();
$types = node_type_get_types();
$t = get_t();
// Delete Custom Variables
if(_{{content_type}}delete_variables() == FALSE){
watchdog('{{content_type}}', 'Unable to cleanup the variable table.', WATCHDOG_ERROR);
drupal_set_message($t('Unable to cleanup the variable table'), 'error');
}
}
/**
* Remove all custom Variables for eHelpdesk
*/
function _{{content_type}}delete_variables(){
// Remove Configuration Setting Variables
return TRUE;
}