Class TClientScriptManager

Description

TClientScriptManager class.

TClientScriptManager manages javascript and CSS stylesheets for a page.

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

TComponent
   |
   --TApplicationComponent
      |
      --TClientScriptManager
Class Constant Summary
 SCRIPT_LOADER = 'clientscripts.php'
 SCRIPT_PATH = 'Web/Javascripts/js'
Method Summary
TClientScriptManager __construct (TPage $owner)
array getDefaultButtonOptions (mixed $panel, mixed $button)
boolean isBeginScriptRegistered (string $key)
boolean isEndScriptRegistered (string $key)
boolean isHeadScriptFileRegistered (string $key)
boolean isHeadScriptRegistered (string $key)
boolean isHiddenFieldRegistered (string $key)
boolean isScriptFileRegistered (string $key)
boolean isStyleSheetFileRegistered (string $key)
boolean isStyleSheetRegistered (string $key)
void registerBeginScript (string $key, string $script)
void registerDefaultButton (TControl $panel, TControl $button)
void registerEndScript (string $key, string $script)
void registerFocusControl (TControl|string $target)
void registerHeadScript (string $key, string $script)
void registerHeadScriptFile (string $key, string $url)
void registerHiddenField (string $name, string|array $value)
void registerPostBackControl (string $jsClass, array $options)
void registerPradoScript (string $name)
void registerScriptFile (string $key, string $url)
void registerStyleSheet (string $key, string $css)
void registerStyleSheetFile (string $key, string $url)
void renderEndScripts (THtmlWriter $writer)
void renderHeadScripts (THtmlWriter $writer)
void renderPradoScripts (mixed $writer)
void renderScriptFiles (THtmlWriter $writer)
void renderStyleSheets (THtmlWriter $writer)
Methods
Constructor __construct (line 97)

Constructor.

  • access: public
TClientScriptManager __construct (TPage $owner)
  • TPage $owner: page that owns this client script manager
getDefaultButtonOptions (line 206)
  • return: default button options.
  • access: protected
array getDefaultButtonOptions (mixed $panel, mixed $button)
isBeginScriptRegistered (line 346)
  • return: whether there is a beginning javascript block registered with the specified key
  • access: public
boolean isBeginScriptRegistered (string $key)
  • string $key: a unique key
isEndScriptRegistered (line 355)
  • return: whether there is an ending javascript block registered with the specified key
  • access: public
boolean isEndScriptRegistered (string $key)
  • string $key: a unique key
isHeadScriptFileRegistered (line 319)
  • return: whether there is a head javascript file registered with the specified key
  • access: public
boolean isHeadScriptFileRegistered (string $key)
  • string $key: a unique key
isHeadScriptRegistered (line 328)
  • return: whether there is a head javascript block registered with the specified key
  • access: public
boolean isHeadScriptRegistered (string $key)
  • string $key: a unique key
isHiddenFieldRegistered (line 364)
  • return: whether there is a hidden field registered with the specified key
  • access: public
boolean isHiddenFieldRegistered (string $key)
  • string $key: a unique key
isScriptFileRegistered (line 337)
  • return: whether there is a javascript file registered with the specified key
  • access: public
boolean isScriptFileRegistered (string $key)
  • string $key: a unique key
isStyleSheetFileRegistered (line 301)
  • return: whether there is a CSS file registered with the specified key
  • access: public
boolean isStyleSheetFileRegistered (string $key)
  • string $key: a unique key
isStyleSheetRegistered (line 310)
  • return: whether there is a CSS block registered with the specified key
  • access: public
boolean isStyleSheetRegistered (string $key)
  • string $key: a unique key
registerBeginScript (line 270)

Registers a javascript script block at the beginning of the form

  • access: public
void registerBeginScript (string $key, string $script)
  • string $key: a unique key identifying the script block
  • string $script: javascript block
registerDefaultButton (line 183)

Register a default button to panel. When the $panel is in focus and the 'enter' key is pressed, the $button will be clicked.

  • access: public
void registerDefaultButton (TControl $panel, TControl $button)
  • TControl $panel: panel to register the default button action
  • TControl $button: button to trigger a postback
registerEndScript (line 280)

Registers a javascript script block at the end of the form

  • access: public
void registerEndScript (string $key, string $script)
  • string $key: a unique key identifying the script block
  • string $script: javascript block
registerFocusControl (line 195)

Registers the control to receive default focus.

  • access: public
void registerFocusControl (TControl|string $target)
  • TControl|string $target: the control or the client ID of the HTML element to receive default focus
registerHeadScript (line 249)

Registers a javascript block in the page head.

  • access: public
void registerHeadScript (string $key, string $script)
  • string $key: a unique key identifying the script block
  • string $script: javascript block
registerHeadScriptFile (line 239)

Registers a javascript file in the page head

  • access: public
void registerHeadScriptFile (string $key, string $url)
  • string $key: a unique key identifying the file
  • string $url: URL to the javascript file
registerHiddenField (line 291)

Registers a hidden field to be rendered in the form.

  • access: public
void registerHiddenField (string $name, string|array $value)
  • string $name: a unique key identifying the hidden field
  • string|array $value: hidden field value, if the value is an array, every element in the array will be rendered as a hidden field value.
registerPostBackControl (line 163)

Registers postback javascript for a control.

  • access: public
void registerPostBackControl (string $jsClass, array $options)
  • string $jsClass: javascript class responsible for the control being registered for postback
  • array $options: postback options
registerPradoScript (line 117)

Registers Prado scripts by library name.

Each library may include one or several script files. Currently, the following libraries are available:

  • prado : basic prado js framework
  • effects :
  • ajax : ajax related js
  • validator : validator js
  • logger : js logger
  • datepicker : datepicker js
  • rico :
  • colorpicker : colorpicker js
The script files registered will be published.

  • access: public
void registerPradoScript (string $name)
  • string $name: script library name.
registerScriptFile (line 259)

Registers a javascript file to be rendered within the form

  • access: public
void registerScriptFile (string $key, string $url)
  • string $key: a unique key identifying the file
  • string $url: URL to the javascript file to be rendered
registerStyleSheet (line 229)

Registers a CSS block to be rendered in the page head

  • access: public
void registerStyleSheet (string $key, string $css)
  • string $key: a unique key identifying the CSS block
  • string $css: CSS block
registerStyleSheetFile (line 219)

Registers a CSS file to be rendered in the page head

  • access: public
void registerStyleSheetFile (string $key, string $url)
  • string $key: a unique key identifying the file
  • string $url: URL to the CSS file
renderBeginScripts (line 427)
  • access: public
void renderBeginScripts (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderEndScripts (line 435)
  • access: public
void renderEndScripts (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderHeadScriptFiles (line 392)
  • access: public
void renderHeadScriptFiles (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderHeadScripts (line 400)
  • access: public
void renderHeadScripts (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderHiddenFields (line 443)
  • access: public
void renderHiddenFields (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderPradoScripts (line 136)
  • access: protected
void renderPradoScripts (mixed $writer)
renderScriptFiles (line 408)
  • access: public
void renderScriptFiles (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderStyleSheetFiles (line 372)
  • access: public
void renderStyleSheetFiles (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose
renderStyleSheets (line 383)
  • access: public
void renderStyleSheets (THtmlWriter $writer)
  • THtmlWriter $writer: writer for the rendering purpose

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::attachEventHandler()
TComponent::canGetProperty()
TComponent::canSetProperty()
TComponent::detachEventHandler()
TComponent::evaluateExpression()
TComponent::evaluateStatements()
TComponent::getEventHandlers()
TComponent::getSubProperty()
TComponent::hasEvent()
TComponent::hasEventHandler()
TComponent::hasProperty()
TComponent::raiseEvent()
TComponent::setSubProperty()
TComponent::__get()
TComponent::__set()
Class Constants
SCRIPT_LOADER = 'clientscripts.php' (line 32)

the PHP script for loading Prado javascript files

SCRIPT_PATH = 'Web/Javascripts/js' (line 28)

directory containing Prado javascript files

Documentation generated on Sun, 04 Jun 2006 18:58:47 -0400 by phpDocumentor 1.3.0RC4