Constructor.
TClientScriptManager
__construct
(TPage $owner)
-
TPage
$owner: page that owns this client script manager
array
getDefaultButtonOptions
(mixed $panel, mixed $button)
boolean
isBeginScriptRegistered
(string $key)
-
string
$key: a unique key
boolean
isEndScriptRegistered
(string $key)
-
string
$key: a unique key
boolean
isHeadScriptFileRegistered
(string $key)
-
string
$key: a unique key
boolean
isHeadScriptRegistered
(string $key)
-
string
$key: a unique key
boolean
isHiddenFieldRegistered
(string $key)
-
string
$key: a unique key
boolean
isScriptFileRegistered
(string $key)
-
string
$key: a unique key
boolean
isStyleSheetFileRegistered
(string $key)
-
string
$key: a unique key
boolean
isStyleSheetRegistered
(string $key)
-
string
$key: a unique key
Registers a javascript script block at the beginning of the form
void
registerBeginScript
(string $key, string $script)
-
string
$key: a unique key identifying the script block
-
string
$script: javascript block
Register a default button to panel. When the $panel is in focus and the 'enter' key is pressed, the $button will be clicked.
-
TControl
$panel: panel to register the default button action
-
TControl
$button: button to trigger a postback
Registers a javascript script block at the end of the form
void
registerEndScript
(string $key, string $script)
-
string
$key: a unique key identifying the script block
-
string
$script: javascript block
Registers the control to receive default focus.
void
registerFocusControl
(
TControl|string $target)
-
TControl|string
$target: the control or the client ID of the HTML element to receive default focus
Registers a javascript block in the page head.
void
registerHeadScript
(string $key, string $script)
-
string
$key: a unique key identifying the script block
-
string
$script: javascript block
Registers a javascript file in the page head
void
registerHeadScriptFile
(string $key, string $url)
-
string
$key: a unique key identifying the file
-
string
$url: URL to the javascript file
Registers a hidden field to be rendered in the form.
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.
Registers postback javascript for a control.
void
registerPostBackControl
(string $jsClass, array $options)
-
string
$jsClass: javascript class responsible for the control being registered for postback
-
array
$options: postback options
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.
void
registerPradoScript
(string $name)
-
string
$name: script library name.
Registers a javascript file to be rendered within the form
void
registerScriptFile
(string $key, string $url)
-
string
$key: a unique key identifying the file
-
string
$url: URL to the javascript file to be rendered
Registers a CSS block to be rendered in the page head
void
registerStyleSheet
(string $key, string $css)
-
string
$key: a unique key identifying the CSS block
-
string
$css: CSS block
Registers a CSS file to be rendered in the page head
void
registerStyleSheetFile
(string $key, string $url)
-
string
$key: a unique key identifying the file
-
string
$url: URL to the CSS file
void
renderPradoScripts
(mixed $writer)
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()