Last active
October 7, 2016 16:20
-
-
Save elpete/0a69b67e829eff4ee180beb5a5622593 to your computer and use it in GitHub Desktop.
Add a ColdBox `applicationHelper` from a module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
component { | |
function configure() {} | |
function onLoad() { | |
var helpers = controller.getSetting( "applicationHelper" ); | |
arrayAppend( | |
helpers, | |
"#moduleMapping#/models/ModuleApplicationHelper.cfm" | |
); | |
controller.setSetting( "applicationHelper", helpers ); | |
} | |
function onUnload() { | |
controller.setSetting( | |
"applicationHelper", | |
arrayFilter( controller.getSetting( "applicationHelper" ), function( helper ) { | |
return helper != "#moduleMapping#/models/ModuleApplicationHelper.cfm"; | |
} ) | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment