-
Notifications
You must be signed in to change notification settings - Fork 85
Plugin Instances
Daniel Hindi edited this page Sep 15, 2015
·
9 revisions
#buildfire.pluginInstance
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
-
options
is an object that consists of the following properties-
prop1
: property description -
prop1
: property description
-
-
callback
is a function that is called when the dialog is complete
buildfire.pluginInstance.showDialog({
prop1:""
},function(instances){
});
Will fetch a list of plugins based on the list of ids
that were passed in
-
ids
an array of strings representing plugin instance ids -
callback
is a function that is called with the results
buildfire.pluginInstance.get(['123','321'],function(instances){
});
Will search all the plugins and return results paginated
-
options
an 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
-
-
callback
is a function that is called with the results
buildfire.pluginInstance.search({},function(instances){
});