-
Notifications
You must be signed in to change notification settings - Fork 84
Plugin Instances
This sdk documentation is deprecated and will not be updated. Check out our new docs at https://sdk.buildfire.com/docs/plugin-instances/
This is an object within the buildfire singleton that is for retrieving other plugins instances that are added to the current app context.
a plugin instance is a new occurrence of a plugin type. For example you can have installed one Text Plugin but have two instances of it.
Typically this is used in launcher or folder type plugins. These types of plugins help the user navigate to other plugins.
- Gotchya: Be careful when saving the plugin instances data to your local datastore. The instance may be deleted or modified after your save. Use Dynamic Data Injection to get latest data
Used typically on the control side. This method will display a dialog that allows the user to search and select one or many plugins
-
optionsis an object that consists of the following properties-
skipPluginInstances: boolean by default it will be false , which shows create plugin instance dialog directly. without showing select plugin instances dialog . -
hideAddPlugin: boolean by default false , which hide the add plugin button on the plugin instances dialog .
-
-
callbackis a function that is called when the dialog is complete-
error: Error object -
instances: array of selected plugin instances-
folderName: string -
iconUrl: string url of plugin instance icon -
instanceId: string -
pluginTypeId: string -
pluginTypeName: string with the plugin type name -
title:string with the title of the plugin
-
-
buildfire.pluginInstance.showDialog({
prop1:""
},function(error, instances){
if(err)
console.error(err);
else if (instances.length > 0)
console.log(instances[0].title)
});
Will fetch a plugins based on instanceId that were passed in
-
instanceIdrepresenting plugin instance id -
callbackis a function that is called with the results
buildfire.pluginInstance.get(['123','321'],function(error,instances){
});
Will search all the plugins and return results paginated
-
optionsan object dictating the search criteria-
title: string that will be regex'ed on title -
pageIndex: integer that start with page zero -
pageSize: max size of 20
-
-
callbackis a function that is called with the results
buildfire.pluginInstance.search({},function(error, instances){
});
Used typically on the control side. This method will display a dialog that allows the user to add a new plugin instance of a specific type and then return that plugin instance to the caller
-
optionsis an object that consists of the following properties-
prop1: property description -
prop1: property description
-
-
callbackis a function that is called when the dialog is complete
buildfire.pluginInstance.showCreatePluginInstancesDialog({
prop1:""
},function(error, instance){
});