Joomla CMS
4.2.2
Documentation des API du CMS Joomla en version 4.2.2
|
Champs de données | |
const | INITIALIZE_CONSTRUCTOR = 2 |
const | INITIALIZE_CONTROLS = 4 |
const | REPLACEABLE_TAG = "{--DEBUGBAR_OB_START_REPLACE_ME--}" |
const | RELATIVE_PATH = 'path' |
const | RELATIVE_URL = 'url' |
Fonctions membres protégées | |
getRelativeRoot ($relativeTo, $basePath, $baseUrl) | |
makeUriRelativeTo ($uri, $root) | |
filterAssetArray ($array, $type='') | |
createAsseticCollection ($files=null, $content=null) | |
dumpAssets ($files=null, $content=null, $targetFilename=null, $useRequireJs=false) | |
getJsInitializationCode () | |
getJsControlsDefinitionCode ($varname) | |
getAddDatasetCode ($requestId, $data, $suffix=null) | |
getNonceAttribute () | |
Attributs protégés | |
$debugBar | |
$baseUrl | |
$basePath | |
$cssVendors | |
$jsVendors | |
$includeVendors = true | |
$cssFiles = array('debugbar.css', 'widgets.css', 'openhandler.css') | |
$jsFiles = array('debugbar.js', 'widgets.js', 'openhandler.js') | |
$additionalAssets = array() | |
$javascriptClass = 'PhpDebugBar.DebugBar' | |
$variableName = 'phpdebugbar' | |
$enableJqueryNoConflict = true | |
$useRequireJs = false | |
$initialization | |
$controls = array() | |
$ignoredCollectors = array() | |
$ajaxHandlerClass = 'PhpDebugBar.AjaxHandler' | |
$ajaxHandlerBindToFetch = false | |
$ajaxHandlerBindToJquery = true | |
$ajaxHandlerBindToXHR = false | |
$ajaxHandlerAutoShow = true | |
$openHandlerClass = 'PhpDebugBar.OpenHandler' | |
$openHandlerUrl | |
$cspNonce | |
Renders the debug bar using the client side javascript implementation
Generates all the needed initialization code of controls
addControl | ( | $name, | |
array | $options | ||
) |
Adds a control to initialize
Possible options:
"icon" or "widget" are at least needed
string | $name | |
array | $options |
addInlineAssets | ( | $inlineCss, | |
$inlineJs, | |||
$inlineHead | |||
) |
Add inline assets to render inline in the head. Ideally, you should store static assets in files that you add with the addAssets function. However, adding inline assets is useful when integrating with 3rd-party libraries that require static assets that are only available in an inline format.
The inline content arrays require special string array keys: they are used to deduplicate content. This is particularly useful if multiple instances of the same asset end up being added. Inline assets from all collectors are merged together into the same array, so these content IDs effectively deduplicate the inline assets.
array | $inlineCss | An array map of content ID to inline CSS content (not including <style> tag) |
array | $inlineJs | An array map of content ID to inline JS content (not including <script> tag) |
array | $inlineHead | An array map of content ID to arbitrary inline HTML content (typically <style>/<script> tags); it must be embedded within the <head> element |
Références $this.
areVendorsIncluded | ( | ) |
Checks if vendors assets are included
disableVendor | ( | $name | ) |
Disable a specific vendor's assets.
string | $name | "jquery", "fontawesome", "highlightjs" |
Références $name.
dumpCssAssets | ( | $targetFilename = null | ) |
Write all CSS assets to standard output or in a file
string | $targetFilename |
dumpHeadAssets | ( | $targetFilename = null | ) |
Write all inline HTML header assets to standard output or in a file (only returns assets not already returned by dumpCssAssets or dumpJsAssets)
string | $targetFilename |
Références null.
dumpJsAssets | ( | $targetFilename = null | ) |
Write all JS assets to standard output or in a file
string | $targetFilename |
|
protected |
Filters a tuple of (css, js, inline_css, inline_js, inline_head) assets according to $type
array | $array | |
string | $type | 'css', 'js', 'inline_css', 'inline_js', 'inline_head', or null for all |
Références $type.
|
protected |
getAjaxHandlerClass | ( | ) |
Returns the class name of the ajax handler
getAsseticCollection | ( | $type = null | ) |
Returns an array where all items are Assetic AssetCollection:
string | $type | Optionally return only 'css', 'js', or 'inline_head' collection |
getAssets | ( | $type = null , |
|
$relativeTo = self::RELATIVE_PATH |
|||
) |
getBasePath | ( | ) |
getBaseUrl | ( | ) |
Returns the base URL from which assets will be served
getControls | ( | ) |
Returns the list of controls
This does not include controls provided by collectors
getCspNonce | ( | ) |
Get the CSP Nonce
getIgnoredCollectors | ( | ) |
Returns the list of ignored collectors
getInitialization | ( | ) |
Returns what should be initialized
getJavascriptClass | ( | ) |
Returns the javascript class name
|
protected |
Returns the js code needed to initialized the controls and data mapping of the debug bar
Controls can be defined by collectors themselves or using {
string | $varname | Debug bar's variable name |
|
protected |
|
protected |
If a nonce it set, create the correct attribute
getOpenHandlerClass | ( | ) |
Returns the class name of the js open handler
getOpenHandlerUrl | ( | ) |
Returns the url for the open handler
|
protected |
getVariableName | ( | ) |
Returns the variable name of the class instance
ignoreCollector | ( | $name | ) |
isAjaxHandlerAutoShow | ( | ) |
Checks whether the ajax handler will immediately show new ajax requests.
isAjaxHandlerBoundToFetch | ( | ) |
Checks whether bindToFetch() will be called on the ajax handler
isAjaxHandlerBoundToJquery | ( | ) |
Checks whether bindToJquery() will be called on the ajax handler
isAjaxHandlerBoundToXHR | ( | ) |
Checks whether bindToXHR() will be called on the ajax handler
isJqueryNoConflictEnabled | ( | ) |
Checks if jQuery.noConflict() will be called
isRequireJsUsed | ( | ) |
Checks if RequireJS is used
|
protected |
Returns the code needed to display the debug bar
AJAX request should not render the initialization code.
boolean | $initialize | Whether or not to render the debug bar initialization code |
boolean | $renderStackedData | Whether or not to render the stacked data |
renderHead | ( | ) |
Register shutdown to display the debug bar
boolean | $here | Set position of HTML. True if is to current position or false for end file |
boolean | $initialize | Whether to render the de bug bar initialization code |
bool | $renderStackedData | |
bool | $head |
Références $this.
Same as renderOnShutdown() with $head = true
boolean | $here | |
boolean | $initialize | |
boolean | $renderStackedData |
Is callback function for register_shutdown_function(...)
boolean | $here | Set position of HTML. True if is to current position or false for end file |
boolean | $initialize | Whether to render the de bug bar initialization code |
bool | $renderStackedData | |
bool | $head |
Références $count.
setAjaxHandlerAutoShow | ( | $autoShow = true | ) |
Sets whether new ajax debug data will be immediately shown. Setting to false could be useful if there are a lot of tracking events cluttering things.
boolean | $autoShow |
Références $this.
setAjaxHandlerClass | ( | $className | ) |
Sets the class name of the ajax handler
Set to false to disable
string | $className |
Références $className, et $this.
setBasePath | ( | $path | ) |
setBaseUrl | ( | $url | ) |
setBindAjaxHandlerToFetch | ( | $bind = true | ) |
setBindAjaxHandlerToJquery | ( | $bind = true | ) |
setBindAjaxHandlerToXHR | ( | $bind = true | ) |
setCspNonce | ( | $nonce = null | ) |
Sets the CSP Nonce (or remove it by setting to null)
string | null | $nonce |
Références $this.
setEnableJqueryNoConflict | ( | $enabled = true | ) |
setIncludeVendors | ( | $enabled = true | ) |
setInitialization | ( | $init | ) |
Sets what should be initialized
integer | $init |
Références $this.
setJavascriptClass | ( | $className | ) |
setOpenHandlerClass | ( | $className | ) |
Sets the class name of the js open handler
string | $className |
Références $className, et $this.
setOpenHandlerUrl | ( | $url | ) |
setOptions | ( | array | $options | ) |
Sets options from an array
Options:
array | $options | [description] |
setUseRequireJs | ( | $enabled = true | ) |
setVariableName | ( | $name | ) |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
const INITIALIZE_CONSTRUCTOR = 2 |
const INITIALIZE_CONTROLS = 4 |
const RELATIVE_PATH = 'path' |
const RELATIVE_URL = 'url' |
const REPLACEABLE_TAG = "{--DEBUGBAR_OB_START_REPLACE_ME--}" |