This repository has been archived by the owner on Jan 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
uh_mece.module
66 lines (61 loc) · 1.75 KB
/
uh_mece.module
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
/**
* @license GPL, or GNU General Public License, version 3
* @license http://opensource.org/licenses/GPL-3.0
* @see README.md how to contribute to this project
*/
/**
* Implements hook_libraries_info().
*/
function uh_mece_libraries_info() {
$libraries = array();
$libraries['mece_php'] = array(
'name' => 'MECE PHP Library',
'vendor url' => 'https://github.com/UniversityofHelsinki/mece-php',
'download url' => 'https://github.com/UniversityofHelsinki/mece-php/archive/v1.1.0.zip',
'path' => 'src/UniversityofHelsinki/MECE',
'version callback' => 'uh_mece_library_version_callback',
'files' => array(
'php' => array(
'VersionTrait.php',
'MultilingualStringValue.php',
'Message.php',
'NotificationMessage.php',
),
),
);
return $libraries;
}
/**
* Callback for bypassing version of MECE PHP Client as it does not provide any
* information or technique to detect it.
*/
function uh_mece_library_version_callback() {
return TRUE;
}
/**
* Implements hook_permission().
*/
function uh_mece_permission() {
return array(
'administer uh_mece' => array(
'title' => t('Administer MECE service configuration'),
'description' => t('Perform configuration changes for MECE service connection.'),
),
);
}
/**
* Implements hook_menu().
*/
function uh_mece_menu() {
$items = array();
$items['admin/config/services/uh_mece'] = array(
'title' => t('UH Message Center configuration'),
'description' => t('Configure your UH Message Center connection.'),
'page callback' => 'drupal_get_form',
'page arguments' => array('uh_mece_configuration'),
'access arguments' => array('administer uh_mece'),
'file' => 'uh_mece.admin.inc',
);
return $items;
}