4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
5 <title>The source code</title>
6 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
7 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <style type="text/css">
9 .highlight { display: block; background-color: #ddd; }
11 <script type="text/javascript">
12 function highlight() {
13 document.getElementById(location.hash.replace(/#/, "")).className = "highlight";
17 <body onload="prettyPrint(); highlight();">
18 <pre class="prettyprint lang-js"><span id='Ext-AbstractPlugin'>/**
19 </span> * The AbstractPlugin class is the base class from which user-implemented plugins should inherit.
21 * This class defines the essential API of plugins as used by Components by defining the following methods:
23 * - `init` : The plugin initialization method which the owning Component calls at Component initialization time.
25 * The Component passes itself as the sole parameter.
27 * Subclasses should set up bidirectional links between the plugin and its client Component here.
29 * - `destroy` : The plugin cleanup method which the owning Component calls at Component destruction time.
31 * Use this method to break links between the plugin and the Component and to free any allocated resources.
33 * - `enable` : The base implementation just sets the plugin's `disabled` flag to `false`
35 * - `disable` : The base implementation just sets the plugin's `disabled` flag to `true`
37 Ext.define('Ext.AbstractPlugin', {
40 constructor: function(config) {
42 if (!config.cmp && Ext.global.console) {
43 Ext.global.console.warn("Attempted to attach a plugin ");
46 Ext.apply(this, config);
53 <span id='Ext-AbstractPlugin-method-init'> /**
55 * The init method is invoked after initComponent method has been run for the client Component.
57 * The supplied implementation is empty. Subclasses should perform plugin initialization, and set up bidirectional
58 * links between the plugin and its client Component in their own implementation of this method.
59 * @param {Ext.Component} client The client Component which owns this plugin.
63 <span id='Ext-AbstractPlugin-method-destroy'> /**
65 * The destroy method is invoked by the owning Component at the time the Component is being destroyed.
67 * The supplied implementation is empty. Subclasses should perform plugin cleanup in their own implementation of
72 <span id='Ext-AbstractPlugin-method-enable'> /**
73 </span> * The base implementation just sets the plugin's `disabled` flag to `false`
75 * Plugin subclasses which need more complex processing may implement an overriding implementation.
78 this.disabled = false;
81 <span id='Ext-AbstractPlugin-method-disable'> /**
82 </span> * The base implementation just sets the plugin's `disabled` flag to `true`
84 * Plugin subclasses which need more complex processing may implement an overriding implementation.