Last active
December 13, 2015 21:08
-
-
Save cameroncf/4974631 to your computer and use it in GitHub Desktop.
In a Mura Plugin, drop this in [plugin]/includes/eventHandler.cfc:onApplicationLoad() to load plugin specific extension sets at application startup
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
| local.rsSites = arguments.$.getBean('settingsManager').getList(); // all sites | |
| local.rsPlugin = arguments.$.getBean('pluginManager').getPlugin( variables.framework.package ); // plugin record | |
| local.pluginAssignments = arguments.$.getBean('pluginManager').getAssignedSites( local.rsPlugin.moduleID ); // recordset of sites this plugin belongs to | |
| local.pluginXML = arguments.$.getBean('pluginManager').getPluginXML( local.rsPlugin.moduleID ); | |
| // loop assigned sites and make sure they are setup per the plugin requirements | |
| for (site in local.pluginAssignments) { | |
| // make sure all class (defined in plugin/config.xml.cfm) extentions exist | |
| application.configBean.getClassExtensionManager().loadConfigXML( local.pluginXML, site.siteID ); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment