-
Notifications
You must be signed in to change notification settings - Fork 3
/
ModuleConfig.cfc
36 lines (30 loc) · 1.09 KB
/
ModuleConfig.cfc
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
component {
this.name = 'cbyaml';
this.author = 'Eric Peterson';
this.webUrl = 'https://github.com/elpete/cbyaml';
this.cfmapping = 'cbyaml';
this.dependencies = ['cbjavaloader'];
function configure() {
settings = {'autoLoadHelpers': true};
}
function onLoad() {
wirebox.getInstance('loader@cbjavaloader').appendPaths(variables.modulePath & '/lib');
if (variables.keyExists('controller') && settings.autoLoadHelpers) {
var helpers = controller.getSetting('applicationHelper');
helpers.append('#moduleMapping#/helpers.cfm');
controller.setSetting('applicationHelper', helpers);
}
}
function onUnload() {
if (variables.keyExists('controller') && settings.autoLoadHelpers) {
controller.setSetting(
'applicationHelper',
controller
.getSetting('applicationHelper')
.filter(function(helper) {
return helper != '#moduleMapping#/helpers.cfm';
})
);
}
}
}