Newer
Older
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
<?php
/**
* @file
*
* Install file for the muchomenu module
*/
/**
* Implements hook_schema().
*/
function muchomenu_schema() {
$schema['muchomenu_menus'] = array(
'description' => 'Stores the enabled state and other attributes of mucho menus.',
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => 'Numeric menu ID',
),
'title' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255
),
'description' => array(
'type' => 'text',
'not null' => FALSE,
),
'enabled' => array(
'description' => 'Enabled state of a mucho menu: 1 = enabled, 0 = disabled',
'type' => 'int',
'unsigned' => FALSE,
'size' => 'tiny',
'default' => '0',
),
'orientation' => array(
'description' => 'Orientation of the entire menu (horizontal or vertical)',
'type' => 'varchar',
'length' => '12',
'not null' => TRUE,
'default' => 'horizontal',
),
'animation_effect' => array(
'description' => 'Animation effect to use when showing or hiding the menu',
'type' => 'varchar',
'length' => '80',
'not null' => TRUE,
'default' => '',
),
'animation_speed' => array(
'description' => 'Animation speed',
'type' => 'varchar',
'length' => '10',
'not null' => TRUE,
'default' => '',
),
),
'primary key' => array('id'),
);
$schema['muchomenu_items'] = array(
'fields' => array(
'id' => array(
'type' => 'serial',
'not null' => TRUE,
'unsigned' => TRUE,
'description' => 'Menu item ID',
),
'menu_id' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'unsigned' => TRUE,
'description' => 'Foreign key pointing to the muchomenu_menus table',
),
'path' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
'description' => 'Menu item path',
),
'panel_name' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
),
'title' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
),
'alt' => array(
'type' => 'varchar',
'not null' => TRUE,
'default' => '',
'length' => 255,
),
'weight' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
'enabled' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 1,
'size' => 'tiny',
),
'description' => array(
'type' => 'text',
'not null' => FALSE,
),
'target' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
'size' => 'tiny',
),
'disable_click' => array(
'type' => 'int',
'not null' => TRUE,
'default' => 1,
'size' => 'tiny',
)
),
'primary key' => array('id'),
);
return $schema;
}
/**
* Implements hook_install().
*/
function muchomenu_install() {
// Create muchomenu tables.
// TODO The drupal_(un)install_schema functions are called automatically in D7.
// drupal_install_schema('muchomenu')
}
/**
* Implements hook_uninstall().
*/
function muchomenu_uninstall() {
// Delete muchomenu tables.
// TODO The drupal_(un)install_schema functions are called automatically in D7.
// drupal_uninstall_schema('muchomenu')
}