Joomla CMS  4.2.2
Documentation des API du CMS Joomla en version 4.2.2
Référence de la classe TwigCollector
+ Graphe d'héritage de TwigCollector:

Fonctions membres publiques

 __construct (TraceableTwigEnvironment $twig)
 
 collect ()
 
 getName ()
 
 getWidgets ()
 
 getAssets ()
 
- Fonctions membres publiques hérités de DataCollector
 setDataFormatter (DataFormatterInterface $formater)
 
 getDataFormatter ()
 
 getXdebugLink ($file, $line=1)
 
 setVarDumper (DebugBarVarDumper $varDumper)
 
 getVarDumper ()
 
 formatVar ($var)
 
 formatDuration ($seconds)
 
 formatBytes ($size, $precision=2)
 
 getXdebugLinkTemplate ()
 
 setXdebugLinkTemplate ($xdebugLinkTemplate, $shouldUseAjax=false)
 
 getXdebugShouldUseAjax ()
 
 getXdebugReplacements ()
 
 setXdebugReplacements ($xdebugReplacements)
 
 setXdebugReplacement ($serverPath, $replacement)
 

Membres hérités additionnels

- Fonctions membres publiques statiques hérités de DataCollector
static setDefaultDataFormatter (DataFormatterInterface $formater)
 
static getDefaultDataFormatter ()
 
static setDefaultVarDumper (DebugBarVarDumper $varDumper)
 
static getDefaultVarDumper ()
 
- Attributs protégés hérités de DataCollector
 $dataFormater
 
 $varDumper
 
 $xdebugLinkTemplate = ''
 
 $xdebugShouldUseAjax = false
 
 $xdebugReplacements = array()
 

Description détaillée

Collects data about rendered templates

http://twig.sensiolabs.org/

Your Twig_Environment object needs to be wrapped in a TraceableTwigEnvironment object

$env = new TraceableTwigEnvironment(new Twig_Environment($loader)); $debugbar->addCollector(new TwigCollector($env));

Obsolète:
use DebugBar instead

Documentation des constructeurs et destructeur

◆ __construct()

__construct ( TraceableTwigEnvironment  $twig)

Documentation des fonctions membres

◆ collect()

collect ( )

Called by the DebugBar when data needs to be collected

Renvoie
array Collected data

Implémente DataCollectorInterface.

Références DataCollector\formatDuration().

◆ getAssets()

getAssets ( )

Returns an array with the following keys:

  • base_path
  • base_url
  • css: an array of filenames
  • js: an array of filenames
  • inline_css: an array map of content ID to inline CSS content (not including <style> tag)
  • inline_js: an array map of content ID to inline JS content (not including <script> tag)
  • inline_head: an array map of content ID to arbitrary inline HTML content (typically <style>/<script> tags); it must be embedded within the <head> element

All keys are optional.

Ideally, you should store static assets in filenames that are returned via the normal css/js keys. However, the inline asset elements are 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: the caller of this function will use them to deduplicate content. This is particularly useful if multiple instances of the same asset provider are used. Inline assets from all collectors are merged together into the same array, so these content IDs effectively deduplicate the inline assets.

Renvoie
array

Implémente AssetProvider.

◆ getName()

getName ( )

Returns the unique name of the collector

Renvoie
string

Implémente DataCollectorInterface.

◆ getWidgets()

getWidgets ( )

Returns a hash where keys are control names and their values an array of options as defined in {

Voir également
DebugBar::addControl()}
Renvoie
array

Implémente Renderable.


La documentation de cette classe a été générée à partir du fichier suivant :