Plugin.html revision 8edc0f00079e98294f7287e4982bff07e80e70e3
<head>
<title>API: plugin Plugin (YUI Library)</title>
</head>
<body id="yahoo-com">
<div id="doc3" class="yui-t2">
<div id="hd">
<h3>plugin <span class="subtitle">3.0.0b1</span></h3>
> Plugin
<form onsubmit="return false">
<div id="propertysearch">
Search: <input autocomplete="off" id="searchinput" />
<div id="searchresults">
</div>
</div>
</form>
</div>
<div id="bd">
<div id="yui-main">
<div class="yui-b">
<form action="#" name="yui-classopts-form" method="get" id="yui-classopts-form">
<fieldset>
<legend>Filters</legend>
<span class="classopts"><input type="checkbox" name="show_private" id="show_private" /> <label for="show_private">Show Private</label></span>
<span class="classopts"><input type="checkbox" name="show_protected" id="show_protected" /> <label for="show_protected">Show Protected</label></span>
<span class="classopts"><input type="checkbox" name="show_deprecated" id="show_deprecated" /> <label for="show_deprecated">Show Deprecated</label></span>
</fieldset>
</form>
<h2>
Class <b property="yui:name">Plugin</b>
<span class="extends">
</span>
</h2>
<!-- class tree goes here -->
<dl class="subclasses" rel="yui:subclasses">
<dt>Known Subclasses:</dt>
<dd>
<a href="DataSourceXMLSchema.html" property="yui:name" title="DataSourceXMLSchema">DataSourceXMLSchema</a>
</span>
<a href="DataSourceArraySchema.html" property="yui:name" title="DataSourceArraySchema">DataSourceArraySchema</a>
</span>
<a href="DataSourceJSONSchema.html" property="yui:name" title="DataSourceJSONSchema">DataSourceJSONSchema</a>
</span>
</span>
<a href="DataSourceTextSchema.html" property="yui:name" title="DataSourceTextSchema">DataSourceTextSchema</a>
</span>
</dd>
</dl>
<div class="summary description" property="yui:description">
Plugin provides a base class for all Plugin classes.
</div>
<div rel="yui:properties" resource="#properties">
<div class="section field details">
<h3 id="properties">Properties</h3>
<div class="content">
- <code>static <span property="yui:type">{String}</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Static property provides a string to identify the class.
</div>
</div>
<hr />
</div>
- <code>static <span property="yui:type">{String}</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
Static property provides the namespace the plugin will be
registered under.
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<h4>Properties inherited from <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a>:</h4>
<div class="content" rel="yui:properties">
<code>
</code>
</div>
</div>
<div class="content" rel="yui:properties">
<code>
</span>
</code>
</div>
</div>
</div>
</div>
<div rel="yui:methods" resource="#methods">
<div class="section method details">
<h3 id="methods">Methods</h3>
<div class="content">
<div class="" rel="yui:method" resource="#method_destructor">
<h4>
<a name="method_destructor">destructor</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">destructor</strong>
(
)
</code>
<div class="description" property="yui:description">
desctructor lifecycle implementation.
Removes any listeners attached by the Plugin and restores
and over-ridden methods.
</div>
<div class="description">
<dl>
<dt>Returns:
<code property="yui:return">
void
</code></dt>
<dd property="yui:returnInfo"></dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_doAfter">
<h4>
<a name="method_doAfter">doAfter</a></h4>
<div class="detail" >
<code>
<strong property="yui:name">doAfter</strong>
(
sFn
,
fn
,
context
)
</code>
<div class="description" property="yui:description">
Listens for events and methods fired by the owner widget.
The handler is called after the event handler or method is called.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">sFn</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> The event of method to listen for.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">fn</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> The handler function to call when the listener fires.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">context</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> An optional context to call the handler with.
Default context is the plugin instance.</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_doBefore">
<h4>
<a name="method_doBefore">doBefore</a></h4>
<div class="detail" >
<code>
<strong property="yui:name">doBefore</strong>
(
sFn
,
fn
,
context
)
</code>
<div class="description" property="yui:description">
Listens for events and methods fired by the host.
The handler is called before the event handler or method is called.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">sFn</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> The event of method to listen for.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">fn</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> The handler function to call when the listener fires.</span>
</dd>
<dd rel="yui:parameter">
<code><span property="yui:name">context</span>
<<span property="yui:type">object</span>>
</code>
<span property="yui:description"> An optional context to call the handler with.
Default context is the plugin instance.</span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
<div class="" rel="yui:method" resource="#method_initializer">
<h4>
<a name="method_initializer">initializer</a></h4>
<div class="detail" >
<code>
void
<strong property="yui:name">initializer</strong>
(
config
)
</code>
<div class="description" property="yui:description">
Initializer lifecycle implementation.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">config</span>
<<span property="yui:type">Object</span>>
</code>
<span property="yui:description"> Configuration object literal for the plugin</span>
</dd>
</dl>
<dl>
<dt>Returns:
<code property="yui:return">
void
</code></dt>
<dd property="yui:returnInfo"></dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<h4>Methods inherited from <a href="Plugin.Host.html" property="yui:name" title="Plugin.Host">Plugin.Host</a>:</h4>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="Plugin.Host.html#method__destroyPlugins" property="yui:name" title="_destroyPlugins">_destroyPlugins</a><span class="private">,</span>
</span>
<a class="private" href="Plugin.Host.html#method__initPlugins" property="yui:name" title="_initPlugins">_initPlugins</a><span class="private">,</span>
</span>
<a class="private" href="Plugin.Host.html#method__plug" property="yui:name" title="_plug">_plug</a><span class="private">,</span>
</span>
<a class="private" href="Plugin.Host.html#method__unplug" property="yui:name" title="_unplug">_unplug</a><span class="private">,</span>
</span>
<a class="" href="Plugin.Host.html#method_hasPlugin" property="yui:name" title="hasPlugin">hasPlugin</a><span class="">,</span>
</span>
<a class="" href="Plugin.Host.html#method_plug" property="yui:name" title="plug">plug</a><span class="">,</span>
</span>
</span>
</code>
</div>
</div>
<h4>Methods inherited from <a href="Attribute.html" property="yui:name" title="Attribute">Attribute</a>:</h4>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="Attribute.html#method__addAttrs" property="yui:name" title="_addAttrs">_addAttrs</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__addLazyAttr" property="yui:name" title="_addLazyAttr">_addLazyAttr</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__defAttrChangeFn" property="yui:name" title="_defAttrChangeFn">_defAttrChangeFn</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__fireAttrChange" property="yui:name" title="_fireAttrChange">_fireAttrChange</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__getAttrInitVal" property="yui:name" title="_getAttrInitVal">_getAttrInitVal</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__isLazyAttr" property="yui:name" title="_isLazyAttr">_isLazyAttr</a><span class="private">,</span>
</span>
<a class="protected" href="Attribute.html#method__set" property="yui:name" title="_set">_set</a><span class="protected">,</span>
</span>
<a class="protected" href="Attribute.html#method__setAttr" property="yui:name" title="_setAttr">_setAttr</a><span class="protected">,</span>
</span>
<a class="private" href="Attribute.html#method__setAttrVal" property="yui:name" title="_setAttrVal">_setAttrVal</a><span class="private">,</span>
</span>
<a class="private" href="Attribute.html#method__splitAttrVals" property="yui:name" title="_splitAttrVals">_splitAttrVals</a><span class="private">,</span>
</span>
<a class="" href="Attribute.html#method_addAttr" property="yui:name" title="addAttr">addAttr</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_addAttrs" property="yui:name" title="addAttrs">addAttrs</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_attrAdded" property="yui:name" title="attrAdded">attrAdded</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_get" property="yui:name" title="get">get</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_getAttrs" property="yui:name" title="getAttrs">getAttrs</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_modifyAttr" property="yui:name" title="modifyAttr">modifyAttr</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_removeAttr" property="yui:name" title="removeAttr">removeAttr</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_reset" property="yui:name" title="reset">reset</a><span class="">,</span>
</span>
<a class="" href="Attribute.html#method_set" property="yui:name" title="set">set</a><span class="">,</span>
</span>
</span>
</code>
</div>
</div>
<div class="content" rel="yui:methods">
<code>
<a class="private" href="Base.html#method__aggregateAttrs" property="yui:name" title="_aggregateAttrs">_aggregateAttrs</a><span class="private">,</span>
</span>
<a class="protected" href="Base.html#method__defDestroyFn" property="yui:name" title="_defDestroyFn">_defDestroyFn</a><span class="protected">,</span>
</span>
<a class="protected" href="Base.html#method__defInitFn" property="yui:name" title="_defInitFn">_defInitFn</a><span class="protected">,</span>
</span>
<a class="private" href="Base.html#method__destroyHierarchy" property="yui:name" title="_destroyHierarchy">_destroyHierarchy</a><span class="private">,</span>
</span>
<a class="private" href="Base.html#method__filterAttrCfs" property="yui:name" title="_filterAttrCfs">_filterAttrCfs</a><span class="private">,</span>
</span>
<a class="protected" href="Base.html#method__getAttrCfgs" property="yui:name" title="_getAttrCfgs">_getAttrCfgs</a><span class="protected">,</span>
</span>
<a class="protected" href="Base.html#method__getClasses" property="yui:name" title="_getClasses">_getClasses</a><span class="protected">,</span>
</span>
<a class="private" href="Base.html#method__initHierarchy" property="yui:name" title="_initHierarchy">_initHierarchy</a><span class="private">,</span>
</span>
<a class="private" href="Base.html#method__initHierarchyData" property="yui:name" title="_initHierarchyData">_initHierarchyData</a><span class="private">,</span>
</span>
<a class="" href="Base.html#method_destroy" property="yui:name" title="destroy">destroy</a><span class="">,</span>
</span>
<a class="" href="Base.html#method_init" property="yui:name" title="init">init</a><span class="">,</span>
</span>
</span>
</code>
</div>
</div>
<h4>Methods inherited from <a href="Event.Target.html" property="yui:name" title="Event.Target">Event.Target</a>:</h4>
<div class="content" rel="yui:methods">
<code>
<a class="" href="Event.Target.html#method__getType" property="yui:name" title="_getType">_getType</a><span class="">,</span>
</span>
<a class="private" href="Event.Target.html#method__parseType" property="yui:name" title="_parseType">_parseType</a>
</span>
</code>
</div>
</div>
</div>
</div>
<div rel="yui:events" resource="#events">
<div class="section method details">
<h3 id="events">Events</h3>
<div class="content">
<div class="" rel="yui:event" resource="#event_hostChange">
<h4>
<a name="event_hostChange">hostChange</a></h4>
<div class="detail">
<code>
<strong property="yui:name">hostChange</strong>
(
event
)
</code>
<div class="description" property="yui:description">
Fires when the value for the configuration attribute 'host' is changed. You can listen for the event using the <a href="Attribute.html#method_on">on</a> method if you wish to be notified before the attribute's value has changed, or using the <a href="Event.Target.html#method_after">after</a> method if you wish to be notified after the attribute's value has changed.
</div>
<div class="description">
<dl rel="yui:parameters">
<dt>Parameters:</dt>
<dd rel="yui:parameter">
<code><span property="yui:name">event</span>
</code>
<span property="yui:description">An Event Facade object with the following attribute specific properties added: <dl> <dt>prevVal</dt> <dd>The value of the attribute, prior to it being set</dd> <dt>newVal</dt> <dd>The value the attribute is to be set to</dd> <dt>attrName</dt> <dd>The name of the attribute being set</dd> <dt>subAttrName</dt> <dd>If setting a property within the attribute's value, the name of the sub-attribute property being set</dd> </dl></span>
</dd>
</dl>
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<div class="content" rel="yui:events">
<code>
<a class="" href="Base.html#event_destroy" property="yui:name" title="destroy">destroy</a><span class="">,</span>
</span>
<a class="" href="Base.html#event_destroyedChange" property="yui:name" title="destroyedChange">destroyedChange</a><span class="">,</span>
</span>
<a class="" href="Base.html#event_init" property="yui:name" title="init">init</a><span class="">,</span>
</span>
<a class="" href="Base.html#event_initializedChange" property="yui:name" title="initializedChange">initializedChange</a><span class="">,</span>
</span>
</code>
</div>
</div>
</div>
</div>
<div rel="yui:attributes" resource="#configattributes">
<div class="section field details">
<h3 id="configattributes">Configuration Attributes</h3>
<div class="content">
<div class="" rel="yui:attribute" resource="#config_host">
<h4><a name="config_host">host</a>
<code>- writeonce <span property="yui:type">PluginHost</span></code>
</h4>
<div class="detail">
<div class="description" property="yui:description">
The plugin's host object.
</div>
</div>
<hr />
</div>
</div>
</div>
<div rel="yui:inheritance">
<h4>Configuration attributes inherited from <a href="Base.html" property="yui:name" title="Base">Base</a>:</h4>
<div class="content" rel="yui:attributes">
<code>
<a class="" href="Base.html#config_destroyed" property="yui:name" title="destroyed">destroyed</a><span class="">,</span>
</span>
<a class="" href="Base.html#config_initialized" property="yui:name" title="initialized">initialized</a><span class="">,</span>
</span>
</code>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="yui-b">
<div class="nav">
<div id="moduleList" class="module">
<h4>Modules</h4>
<ul class="content">
<li class=""><a href="module_classnamemanager.html" title="classnamemanager">classnamemanager</a></li>
<li class=""><a href="module_node-focusmanager.html" title="node-focusmanager">node-focusmanager</a></li>
<li class=""><a href="module_widget-position-ext.html" title="widget-position-ext">widget-position-ext</a></li>
</ul>
</div>
<div id="classList" class="module">
<h4>Classes</h4>
<ul class="content">
</ul>
</div>
<div id="fileList" class="module">
<h4>Files</h4>
<ul class="content">
</ul>
</div>
<div id="propertyList" class="module">
<h4>Properties</h4>
<ul class="content">
</ul>
</div>
<div id="methodsList" class="module">
<h4>Methods</h4>
<ul class="content">
<li class=""><a href="#method_destructor" title="destructor">destructor</a></li>
<li class=""><a href="#method_doAfter" title="doAfter">doAfter</a></li>
<li class=""><a href="#method_doBefore" title="doBefore">doBefore</a></li>
<li class=""><a href="#method_initializer" title="initializer">initializer</a></li>
</ul>
</div>
<div id="eventsList" class="module">
<h4>Events</h4>
<ul class="content">
<li class=""><a href="#event_hostChange" title="hostChange">hostChange</a></li>
</ul>
</div>
<div id="configList" class="module">
<h4>Configuration Attributes</h4>
<ul class="content">
<li class=""><a href="#config_host" title="host">host</a></li>
</ul>
</div>
</div>
</div>
</div>
<div id="ft">
<hr />
Copyright © 2009 Yahoo! Inc. All rights reserved.
</div>
</div>
<script type="text/javascript">
ALL_YUI_PROPS = [{"access": "", "host": "Plugin", "name": "destructor", "url": "Plugin.html#method_destructor", "type": "method"}, {"access": "", "host": "Plugin", "name": "doAfter", "url": "Plugin.html#method_doAfter", "type": "method"}, {"access": "", "host": "Plugin", "name": "doBefore", "url": "Plugin.html#method_doBefore", "type": "method"}, {"access": "", "host": "Plugin", "name": "host", "url": "Plugin.html#config_host", "type": "config"}, {"access": "", "host": "Plugin", "name": "hostChange", "url": "Plugin.html#event_hostChange", "type": "event"}, {"access": "", "host": "Plugin", "name": "initializer", "url": "Plugin.html#method_initializer", "type": "method"}, {"access": "", "host": "Plugin", "name": "Plugin.NAME", "url": "Plugin.html#property_Plugin.NAME", "type": "property"}, {"access": "", "host": "Plugin", "name": "Plugin.NS", "url": "Plugin.html#property_Plugin.NS", "type": "property"}];
</script>
</body>
</html>