-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlc_connector.install
87 lines (80 loc) · 2.23 KB
/
lc_connector.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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
// vim: set ts=2 sw=2 sts=2 et ft=php:
/**
* @file
* Installation routines
*/
/**
* Since the integration code highly depends on the LiteCommerce version being
* integrated, this Drupal module only forwards Drupal hooks into a
* LiteCommerce doing the actual work. That way shop owners can upgrade both
* LiteCommerce and the integration code at once via the LiteCommerce automatic
* upgrade function within the shop back end.
*
* The back side of this is the use of complex wrapper functions for Drupal
* hooks. To prevent possible issues, get rid of global variables and make the
* interface easier to understand the wrapper logic is localized in PHP classes
* with private and protected class methods and static fields.
*/
/**
* Module tables schema.
*
* The method LCConnector_Install::getSchema() is located in
* lc_connector/classes/Install.php
*
* This method returns a database schema for module installation.
*
* @hook schema
*/
function lc_connector_schema() {
return LCConnector_Install::getSchema();
}
/**
* Install module.
*
* The method LCConnector_Install::performInstall() is located in
* lc_connector/classes/Install.php
*
* This method performs a module installation.
*
* @hook install
*/
function lc_connector_install() {
LCConnector_Install::performInstall();
}
/**
* Uninstall module.
*
* The method LCConnector_Install::performUninstall() is located in
* lc_connector/classes/Install.php
*
* This method performs a module uninstallation
*
* @hook uninstall
*/
function lc_connector_uninstall() {
LCConnector_Install::performUninstall();
}
/**
* Implementation hook_requirements().
*
* The method LCConnector_Install::checkRequirements() is located in
* lc_connector/classes/Install.php
*
* This method performs checking of LiteCommerce system requirements.
*
* @param string $phase
* Installation phase
*
* @hook requirements
* @return array
*/
function lc_connector_requirements($phase) {
return LCConnector_Install::checkRequirements($phase);
}
// Include some scripts if not loaded yet
if (!class_exists('LCConnector_Install')) {
$current_dir = dirname(__FILE__);
require_once $current_dir . '/classes/Abstract.php';
require_once $current_dir . '/classes/Install.php';
}