package | Default |
---|
addFileToPackage( $sPackageName, $sType, $sFileName)
var | string name of the package string css/js string name of the file to add |
---|---|
analyzeUrl( $sUrl): array
array
convertDevBaseUrl(string $package)
string
getCoreScripts(): array
array
getCssFiles(): array
array
getFontPackages(): array
array
getRecursiveDependencies(string $sPackageName)
string
getScriptFiles()
IsFileInPackage( $sPackageName, $sType, $sFileName): boolean
var | string name of the package string css/js string name of the file to remove |
---|---|
boolean
recordCachingAction( $context, $method, $params)
registerCssFile( $url, $media = '')
registerPackage(string $name): void|static
string
void|static
registerPackageScriptOnPosition(string $name, $position): static
see | \renderCoreScript |
---|---|
Throws |
|
string
the name of the script package.
static
the CClientScript object itself (to support method chaining, available since version 1.1.5).
registerScriptFile(string $url,string $position = null,array $htmlOptions = array()): void|static
If debug mode is ON, we don't use the asset manager, so developpers just have to refresh their browser cache to reload the new scripts. To make developer life easier, if they want to register a single script file, they can use App()->getClientScript()->registerScriptFile({url to script file}) if the file exist in local file system and debug mode is off, it will find the path to the file, and it will publish it via the asset manager
string
string
array
void|static
removeFileFromPackage( $sPackageName, $sType, $sFileName)
var | string name of the package string css/js string name of the file to remove |
---|---|
render(string &$output)
This method is called in \CController::render when it finishes
rendering content. CClientScript thus gets a chance to insert script tags
at head
and body
sections in the HTML output.
string
the existing output that needs to be inserted with script tags
renderBodyBegin(string &$output)
This is overwriting the core method and is exactly the same except the marked parts
string
the output to be inserted with scripts.
renderBodyEnd(string &$output)
This is overwriting the core method and is exactly the same except the marked parts
string
the output to be inserted with scripts.
renderCoreScripts()
renderHead(string &$output)
string
the output to be inserted with scripts.
unregisterPackage( $sName)
It can be useful when mixing backend/frontend rendering (see: template editor)
var | of the package to remove |
---|---|
unregisterScriptFile( $sName)
POS_POSTSCRIPT
POS_PREBEGIN