## Class TClientSideOptions

Description

TClientSideOptions abstract class.

TClientSideOptions manages client-side options for components that have common client-side javascript behaviours and client-side events such as between ActiveControls and validators.

- abstract:
- since: 3.0
- version: $Id: TClientScriptManager.php 2283 2007-10-01 00:33:28Z xue $
- author: <weizhuo[at]gmail[dot]com>

Located in /Web/UI/TClientScriptManager.php (line 635)

    TComponent
       |
       --TClientSideOptions

Direct descendents

Class | Description
--- | ---
TCallbackClientSide | TCallbackClientSide class.
TValidatorClientSide | TValidatorClientSide class.
TColorPickerClientSide | TColorPickerClientSide class.
TDatePickerClientScript | TDatePickerClientScript class.
TSliderClientScript | TSliderClientScript class.
TClientSideValidationSummaryOptions | TClientSideValidationSummaryOptions class.

Method Summary
TClientSideOptions __construct ()
void ensureFunction (mixed $javascript)
string getOption (mixed $name)
TMap getOptions ()
void setFunction (string $name, string $code)
void setOption (string $name, mixed $value)
Methods
Constructor __construct (line 645)

Constructor, initialize the options list.

- access: public

TClientSideOptions __construct ()
ensureFunction (line 694)

Ensure that the javascript statements are wrapped in a javascript function block as

    function(sender, parameter){ //code }

.

- access: protected

void ensureFunction (mixed $javascript)

Redefined in descendants as:

- TCallbackClientSide::ensureFunction() : Returns javascript statement enclosed within a javascript function.
- TClientSideValidationSummaryOptions::ensureFunction() : Ensure the string is a valid javascript function. If the string begins with "javascript:" valid javascript function is assumed, otherwise the code block is enclosed with "function(summary, validators){ }" block.

getOption (line 668)

- return: gets a particular option, null if not set.
- access: protected

string getOption (mixed $name)
getOptions (line 685)

- return: gets the list of options as TMap
- access: public

TMap getOptions ()
setFunction (line 658)

Adds on client-side event handler by wrapping the code within a javascript function block. If the code begins with "javascript:", the code is assumed to be a javascript function block rather than arbiturary javascript statements.

- access: protected

void setFunction (string $name, string $code)

- string $name: option name
- string $code: javascript statements.

setOption (line 677)

- access: protected

void setOption (string $name, mixed $value)

- string $name: option name
- mixed $value: option value.

#### Inherited Methods

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, 21 Apr 2008 11:33:38 -0400 by phpDocumentor 1.3.0RC4