X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/6746dc89c47ed01b165cc1152533605f97eb8e8d..HEAD:/src/PluginManager.js?ds=sidebyside diff --git a/src/PluginManager.js b/src/PluginManager.js index 57129eb8..6c79a5a0 100644 --- a/src/PluginManager.js +++ b/src/PluginManager.js @@ -13,16 +13,27 @@ If you are unsure which license is appropriate for your use, please contact the */ /** - * @class Ext.PluginManager - * @extends Ext.AbstractManager - *
Provides a registry of available Plugin classes indexed by a mnemonic code known as the Plugin's ptype.
- * The {@link Ext.Component#xtype xtype}
provides a way to avoid instantiating child Components
- * when creating a full, nested config object for a complete Ext page.
A child Component may be specified simply as a config object
- * as long as the correct {@link Ext.Component#xtype xtype}
is specified so that if and when the Component
- * needs rendering, the correct type can be looked up for lazy instantiation.
For a list of all available {@link Ext.Component#xtype xtypes}
, see {@link Ext.Component}.
ptype
. (Optional if the config contains a ptype
).
+ * @param {Function} defaultType (optional) The constructor to provide the default Plugin type if the config object does not
+ * contain a `ptype`. (Optional if the config contains a `ptype`).
* @return {Ext.Component} The newly instantiated Plugin.
*/
//create: function(plugin, defaultType) {
@@ -62,7 +73,7 @@ Ext.define('Ext.PluginManager', {
} else {
return Ext.createByAlias('plugin.' + (config.ptype || defaultType), config);
}
-
+
// Prior system supported Singleton plugins.
//var PluginCls = this.types[config.ptype || defaultType];
//if (PluginCls.init) {
@@ -75,8 +86,9 @@ Ext.define('Ext.PluginManager', {
/**
* Returns all plugins registered with the given type. Here, 'type' refers to the type of plugin, not its ptype.
* @param {String} type The type to search for
- * @param {Boolean} defaultsOnly True to only return plugins of this type where the plugin's isDefault property is truthy
- * @return {Array} All matching plugins
+ * @param {Boolean} defaultsOnly True to only return plugins of this type where the plugin's isDefault property is
+ * truthy
+ * @return {Ext.AbstractPlugin[]} All matching plugins
*/
findByType: function(type, defaultsOnly) {
var matches = [],
@@ -95,12 +107,12 @@ Ext.define('Ext.PluginManager', {
return matches;
}
-}, function() {
+}, function() {
/**
* Shorthand for {@link Ext.PluginManager#registerType}
* @param {String} ptype The ptype mnemonic string by which the Plugin class
* may be looked up.
- * @param {Constructor} cls The new Plugin class.
+ * @param {Function} cls The new Plugin class.
* @member Ext
* @method preg
*/