## 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 1398 2006-09-08 19:31:03Z xue $
- author: <weizhuo[at]gmail[dot]com>

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

    TComponent
       |
       --TClientSideOptions

Direct descendents

Class | Description
--- | ---
TCallbackClientSide | TCallbackClientSide class.
TValidatorClientSide | TValidatorClientSide class.
TDatePickerClientScript | TDatePickerClientScript 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 593)

Constructor, initialize the options list.

- access: public

TClientSideOptions __construct ()
ensureFunction (line 642)

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

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

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

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

TMap getOptions ()
setFunction (line 606)

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

- 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, 14 Jan 2007 21:41:34 -0500 by phpDocumentor 1.3.0RC4