Js API Documentation
SoPHIELabs Js API Class
The API provides JavaScript helper functionality
Init: $jsApi = $api->get('sophielabs_js');
Method: $jsApi->appendScript(...)
Append inline JavaScript at the end of the body
Parameters:
- String $script Script to be included
Method: $jsApi->prependScript(...)
Prepend inline JavaScript at the end of the body
Parameters:
- String $script Script to be included
Method: $jsApi->appendFile(...)
Append JavaScript file at the end of the body
Parameters:
- String $file File url
Method: $jsApi->prependFile(...)
Prepend JavaScript file at the end of the body
Parameters:
- String $file File url
Method: $jsApi->appendAsset(...)
Append JavaScript asset file at the end of the body
Parameters:
- String $assetLabel Label of the asset to append
Method: $jsApi->prependAsset(...)
Prepend JavaScript asset file at the end of the body
Parameters:
- String $assetLabel Label of the asset to append
Method: $jsApi->appendHeadScript(...)
Append inline JavaScript in head section
Parameters:
- String $script Script to be included
Method: $jsApi->prependHeadScript(...)
Prepend inline JavaScript in head section
Parameters:
- String $script Script to be included
Method: $jsApi->appendHeadFile(...)
Append JavaScript file in head section
Parameters:
- String $file File url
Method: $jsApi->prependHeadFile(...)
Prepend JavaScript file in head section
Parameters:
- String $file File url