Created
May 28, 2019 19:34
-
-
Save sgithens/c8017b923aedfcccb262512a966be4fb to your computer and use it in GitHub Desktop.
Currently not showing unsupported entries in the PPT
This file contains hidden or 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
| /** | |
| * checkForSupportedSetting Handlebars helper | |
| * Takes a solutions registry entry and settingKey, then checks to see if | |
| * it's a setting that the solution supports. This is primarily used to see | |
| * if a generic preference setting is supported by the solution and used | |
| * in one of it's transformations. | |
| * The underlying functionality for this should be moved to a utility method | |
| * with unit tests. | |
| * | |
| * @param {Object} solution - The solution registry entry. | |
| * @param {String} settingKey - The generic pref setting key. | |
| * @return {Boolean} Returns `true` if this solution supports the setting, otherwise `false`. | |
| */ | |
| Handlebars.registerHelper("checkForSupportedSetting", function (solution, settingKey) { | |
| console.log("Is this actually getting called?"); | |
| var togo = false; | |
| fluid.find | |
| fluid.each(solution.settingsHandlers, function (i) { | |
| fluid.each(i.supportedSettings, function (j, jkey) { | |
| if (jkey === settingKey) { | |
| togo = true; | |
| } | |
| }); | |
| }); | |
| return togo; | |
| }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment