## 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 2614 2009-02-24 09:54:08Z Christophe.Boulain $
- author: <weizhuo[at]gmail[dot]com>

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

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

Constructor, initialize the options list.

- access: public

TClientSideOptions __construct ()
ensureFunction (line 745)

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

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

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

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

TMap getOptions ()
setFunction (line 709)

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

- 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, 22 Feb 2010 12:17:06 +0000 by phpDocumentor 1.3.0RC4