## 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 2252 2007-09-27 20:10:02Z xue $
- author: <weizhuo[at]gmail[dot]com>

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

    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 636)

Constructor, initialize the options list.

- access: public

TClientSideOptions __construct ()
ensureFunction (line 685)

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 659)

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

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

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

TMap getOptions ()
setFunction (line 649)

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 668)

- 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 Sun, 30 Sep 2007 19:14:31 -0400 by phpDocumentor 1.3.0RC4