| | 38 | <!--- Get a setting ---> |
| | 39 | <cffunction name="getSetting" hint="I get a setting from the FW Config structures. Use the FWSetting boolean argument to retrieve from the fwSettingsStruct." access="remote" returntype="any" output="false"> |
| | 40 | <!--- ************************************************************* ---> |
| | 41 | <cfargument name="name" type="string" hint="Name of the setting key to retrieve" > |
| | 42 | <cfargument name="FWSetting" type="boolean" required="false" hint="Boolean Flag. If true, it will retrieve from the fwSettingsStruct else from the configStruct. Default is false." default="false"> |
| | 43 | <!--- ************************************************************* ---> |
| | 44 | <cfscript> |
| | 45 | var cbController = ""; |
| | 46 | var setting = ""; |
| | 47 | |
| | 48 | //Verify the coldbox app is ok, else throw |
| | 49 | if ( verifyColdBox() ){ |
| | 50 | cbController = application.cbController; |
| | 51 | } |
| | 52 | |
| | 53 | //Get Setting else return "" |
| | 54 | if( cbController.settingExists(argumentCollection=arguments) ){ |
| | 55 | setting = cbController.getSetting(argumentCollection=arguments); |
| | 56 | } |
| | 57 | |
| | 58 | //Get settings |
| | 59 | return setting; |
| | 60 | </cfscript> |
| | 61 | </cffunction> |
| | 62 | |
| | 63 | <!--- Get ColdBox Settings ---> |
| | 64 | <cffunction name="getColdboxSettings" access="remote" returntype="struct" output="false" hint="I retrieve the ColdBox Settings Structure by Reference"> |
| | 65 | <cfscript> |
| | 66 | var cbController = ""; |
| | 67 | |
| | 68 | //Verify the coldbox app is ok, else throw |
| | 69 | if ( verifyColdBox() ){ |
| | 70 | cbController = application.cbController; |
| | 71 | } |
| | 72 | |
| | 73 | //Get settings |
| | 74 | return cbController.getColdboxSettings(); |
| | 75 | </cfscript> |
| | 76 | </cffunction> |
| | 77 | |
| | 78 | <!--- Get ColdBox Settings ---> |
| | 79 | <cffunction name="getConfigSettings" access="remote" returntype="struct" output="false" hint="I retrieve the Config Settings Structure by Reference"> |
| | 80 | <cfscript> |
| | 81 | var cbController = ""; |
| | 82 | |
| | 83 | //Verify the coldbox app is ok, else throw |
| | 84 | if ( verifyColdBox() ){ |
| | 85 | cbController = application.cbController; |
| | 86 | } |
| | 87 | |
| | 88 | //Get settings |
| | 89 | return cbController.getConfigSettings(); |
| | 90 | </cfscript> |
| | 91 | </cffunction> |
| | 92 | |