This repository was archived by the owner on Sep 27, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwsdl_docs.install
More file actions
61 lines (56 loc) · 1.42 KB
/
wsdl_docs.install
File metadata and controls
61 lines (56 loc) · 1.42 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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
<?php
/**
* @file
* Install file for WSDL docs module.
*/
/**
* Add the description field in the entity.
*/
function wsdl_docs_schema_alter(&$schema) {
$schema['wsclient_service']['fields']['description'] = array(
'description' => 'The description of the service.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
);
$schema['wsclient_service']['fields']['uid'] = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
);
$schema['wsclient_service']['fields']['created'] = array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
);
}
/**
* Implements hook_install().
*/
function wsdl_docs_install() {
db_add_field('wsclient_service', 'description', array(
'description' => 'The description of the service.',
'type' => 'varchar',
'length' => 255,
'not null' => FALSE,
));
db_add_field('wsclient_service', 'uid', array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
db_add_field('wsclient_service', 'created', array(
'type' => 'int',
'not null' => TRUE,
'default' => 0,
));
variable_set('pathauto_node_operations_pattern', 'soap_apis/[node:field-service-ref:label]/[node:title]');
}
/**
* Implements hook_uninstall().
*/
function wsdl_docs_uninstall() {
db_drop_field('wsclient_service', 'description');
db_drop_field('wsclient_service', 'uid');
db_drop_field('wsclient_service', 'created');
}