Constructor.
TClientScriptManager
__construct
(TPage $owner)
-
TPage
$owner: page that owns this client script manager
Returns javascript statement that create a new callback request object.
string
getCallbackReference
(ICallbackEventHandler $callbackHandler, [array $options = null])
-
ICallbackEventHandler
$callbackHandler: callback response handler
-
array
$options: additional callback options
array
getDefaultButtonOptions
(string $panelID, string $buttonID)
-
string
$panelID: the unique ID of the container control
-
string
$buttonID: the unique ID of the button control
array
getPackagePathUrl
(string $base)
-
string
$base: javascript package path.
string
getPradoScriptAssetUrl
()
boolean
getRequiresHead
()
boolean
hasBeginScripts
()
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
Registers callback javascript for a control.
void
registerCallbackControl
(string $class, array $options)
-
string
$class: javascript class responsible for the control being registered for callback
-
array
$options: callback options
Register a default button to panel. When the $panel is in focus and the 'enter' key is pressed, the $button will be clicked.
-
TControl|string
$panel: panel (or its unique ID) to register the default button action
-
TControl|string
$button: button (or its unique ID) 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
(string $target)
-
string
$target: the client ID of the control 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.
Publishes a javascript library path and register packages to be loaded.
See TClientScriptLoader for component that enables users to register custom javascript libraries.
string
registerJavascriptPackages
(string $base, array $packages, [boolean $debug = null], [boolean $gzip = true])
-
string
$base: javascript library base path
-
array
$packages: list of packages or javascript files (without .js extension) to be loaded.
-
boolean
$debug: true to enable keep comments in javascript files loaded, null to use application configuration.
-
boolean
$gzip: true to gzip the javascript code if browsers and php supports it.
Registers postback javascript for a control. A null class parameter will prevent the javascript code registration.
void
registerPostBackControl
(string $class, array $options)
-
string
$class: javascript class responsible for the control being registered for postback
-
array
$options: postback options
Registers Prado javascript by library name. See "Web/Javascripts/source/packages.php" for library names.
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, [mixed $media = ''])
-
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 $media = ''])
-
string
$key: a unique key identifying the file
-
string
$url: URL to the CSS file
-
string
$media: media type of the CSS (such as 'print', 'screen', etc.). Defaults to empty, meaning the CSS applies to all media types.
Renders the HTML tags for PRADO js files
void
verifyJavascriptPackages
(mixed $base, mixed $path, mixed $scripts)
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::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()