-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodule_hide.install
More file actions
43 lines (38 loc) · 1.01 KB
/
Copy pathmodule_hide.install
File metadata and controls
43 lines (38 loc) · 1.01 KB
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
<?php
/**
* Implements hook_install(). Add "hidden" field to the system table schema.
*/
function module_hide_install() {
$ret = array();
// Define the field that I am adding to the system table
$field = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
);
// Add this field
db_add_field($ret, 'system', 'hidden', $field);
}
/**
* Implements hook_schema_alter().
*/
//function module_hide_schema_alter() {
//@TODO Figure out if I need to alter the schema to account for the column
// that I added to the db. The comment code below may or may not be working.
// $schema['system'] = array(
// 'fields' => array(
// 'hidden' => array(
// 'description' => 'Boolean indicating whether or not this module or theme should be hidden.',
// 'type' => 'int',
// 'not null' => TRUE,
// 'default' => 0),
// ),
// );
//}
/**
* Implements hook_uninstall().
*/
function module_hide_uninstall() {
$ret = array();
db_drop_field($ret, 'system', 'hidden');
}