## Class TControlAdapter

Description

TControlAdapter class

TControlAdapter is the base class for adapters that customize various behaviors for the control to which the adapter is attached.

- since: 3.0
- version: $Id: TControlAdapter.php 2541 2008-10-21 15:05:13Z qiang.xue $
- author: Qiang Xue <qiang.xue@gmail.com>

Located in /Web/UI/TControlAdapter.php (line 24)

    TComponent
       |
       --TApplicationComponent
          |
          --TControlAdapter

Direct descendents

Class | Description
--- | ---
TActiveControlAdapter | TActiveControlAdapter class.
TActivePageAdapter | TActivePageAdapter class.
TWebControlAdapter | TWebControlAdapter class

Method Summary
TControlAdapter __construct (TControl $control)
void createChildControls ()
TControl getControl ()
TPage getPage ()
void loadState ()
void onInit (TEventParameter $param)
void onLoad (TEventParameter $param)
void onPreRender (TEventParameter $param)
void onUnload (TEventParameter $param)
void render (THtmlWriter $writer)
void renderChildren (THtmlWriter $writer)
void saveState ()
Methods
Constructor __construct (line 35)

Constructor.

- access: public

TControlAdapter __construct (TControl $control)

- TControl $control: the control to which the adapter is attached

Redefined in descendants as:

- TActiveControlAdapter::__construct() : Constructor.
- TActivePageAdapter::__construct() : Constructor, trap errors and exception to let the callback response handle them.

createChildControls (line 60)

Creates child controls for the attached control.

Default implementation calls the attached control's corresponding method.

- access: public

void createChildControls ()
getControl (line 43)

- return: the control to which this adapter is attached
- access: public

TControl getControl ()
getPage (line 51)

- return: the page that contains the attached control
- access: public

TPage getPage ()
loadState (line 69)

Loads additional persistent control state.

Default implementation calls the attached control's corresponding method.

- access: public

void loadState ()
onInit (line 88)

This method is invoked when the control enters 'OnInit' stage.

Default implementation calls the attached control's corresponding method.

- access: public

void onInit (TEventParameter $param)

- TEventParameter $param: event parameter to be passed to the event handlers

onLoad (line 98)

This method is invoked when the control enters 'OnLoad' stage.

Default implementation calls the attached control's corresponding method.

- access: public

void onLoad (TEventParameter $param)

- TEventParameter $param: event parameter to be passed to the event handlers

Redefined in descendants as:

- TActiveControlAdapter::onLoad() : Starts viewstate tracking if necessary after when controls has been loaded

onPreRender (line 108)

This method is invoked when the control enters 'OnPreRender' stage.

Default implementation calls the attached control's corresponding method.

- access: public

void onPreRender (TEventParameter $param)

- TEventParameter $param: event parameter to be passed to the event handlers

onUnload (line 118)

This method is invoked when the control enters 'OnUnload' stage.

Default implementation calls the attached control's corresponding method.

- access: public

void onUnload (TEventParameter $param)

- TEventParameter $param: event parameter to be passed to the event handlers

render (line 128)

This method is invoked when the control renders itself.

Default implementation calls the attached control's corresponding method.

- access: public

void render (THtmlWriter $writer)

- THtmlWriter $writer: writer for the rendering purpose

Redefined in descendants as:

- TActiveControlAdapter::render() : Renders the callback client scripts.
- TWebControlAdapter::render() : Renders the control to which the adapter is attached.

renderChildren (line 138)

Renders the control's children.

Default implementation calls the attached control's corresponding method.

- access: public

void renderChildren (THtmlWriter $writer)

- THtmlWriter $writer: writer for the rendering purpose

saveState (line 78)

Saves additional persistent control state.

Default implementation calls the attached control's corresponding method.

- access: public

void saveState ()

Redefined in descendants as:

- TActiveControlAdapter::saveState() : Saves additional persistent control state. Respond to viewstate changes if necessary.

#### Inherited Methods

Inherited From TApplicationComponent

> TApplicationComponent::getApplication()
> TApplicationComponent::getRequest()
> TApplicationComponent::getResponse()
> TApplicationComponent::getService()
> TApplicationComponent::getSession()
> TApplicationComponent::getUser()
> TApplicationComponent::publishAsset()
> TApplicationComponent::publishFilePath()

Inherited From TComponent

> TComponent::addParsedObject()
> TComponent::attachEventHandler()
> TComponent::canGetProperty()
> TComponent::canSetProperty()
> TComponent::createdOnTemplate()
> TComponent::detachEventHandler()
> TComponent::evaluateExpression()
> TComponent::evaluateStatements()
> TComponent::getEventHandlers()
> TComponent::getSubProperty()
> TComponent::hasEvent()
> TComponent::hasEventHandler()
> TComponent::hasProperty()
> TComponent::raiseEvent()
> TComponent::setSubProperty()
> TComponent::__get()
> TComponent::__set()

Documentation generated on Mon, 22 Feb 2010 12:17:16 +0000 by phpDocumentor 1.3.0RC4