X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/530ef4b6c5b943cfa68b779d11cf7de29aa878bf..7a654f8d43fdb43d78b63d90528bed6e86b608cc:/docs/source/AbstractPlugin.html diff --git a/docs/source/AbstractPlugin.html b/docs/source/AbstractPlugin.html new file mode 100644 index 00000000..f09fc4dd --- /dev/null +++ b/docs/source/AbstractPlugin.html @@ -0,0 +1,49 @@ +
\ No newline at end of file/** + * @class Ext.AbstractPlugin + * @extends Object + * + * Plugins are injected + */ +Ext.define('Ext.AbstractPlugin', { + disabled: false, + + constructor: function(config) { + //<debug> + if (!config.cmp && Ext.global.console) { + Ext.global.console.warn("Attempted to attach a plugin "); + } + //</debug> + Ext.apply(this, config); + }, + + getCmp: function() { + return this.cmp; + }, + + /** + * The init method is invoked after initComponent has been run for the + * component which we are injecting the plugin into. + */ + init: Ext.emptyFn, + + /** + * The destroy method is invoked by the owning Component at the time the Component is being destroyed. + * Use this method to clean up an resources. + */ + destroy: Ext.emptyFn, + + /** + * Enable the plugin and set the disabled flag to false. + */ + enable: function() { + this.disabled = false; + }, + + /** + * Disable the plugin and set the disabled flag to true. + */ + disable: function() { + this.disabled = true; + } +}); +