DebugExtension
class Cms\Twig\DebugExtension
extends Twig\Extension\AbstractExtension
Extends
| Class | Description |
|---|---|
Twig\Extension\AbstractExtension
|
Constants
| Constant | Type | Value | Description |
|---|---|---|---|
ARRAY_CAPTION
|
string |
"Array variables"
|
string
"Array variables"
|
COMPONENT_CAPTION
|
string |
"Component variables"
|
string
"Component variables"
|
OBJECT_CAPTION
|
string |
"Object variables"
|
string
"Object variables"
|
PAGE_CAPTION
|
string |
"Page variables"
|
string
"Page variables"
|
Properties
protected
$blockMethods
:
array
= ["componentDetails","defineProperties","getPropertyOptions","offsetExists","offsetGet","offsetSet","offsetUnset"]
Blocked object methods that should not be included in the dump.
protected
$commentMap
:
array
= []
Collection of method/property comments.
protected
$variablePrefix
:
bool
= false
If no variable is passed, true.
protected
$zebra
:
int
= 1
Helper for rendering table row styles.
Methods
public
dump (mixed $variables = null, mixed $caption = null)
: void
Dump information about a variable
| Property | Type | Description |
|---|---|---|
| $variables | mixed |
mixed
Variable to dump |
| $caption | mixed |
mixed
Caption [and subcaption] of the dump |
public getFunctions () : array
Returns a list of global functions to add to the existing list.
An array of global functions
public runDump (Twig\Environment $env, array $context) : string
Processes the dump variables, if none is supplied, all the twig template variables are used
| Property | Type | Description |
|---|---|---|
| $env | Twig\Environment |
Twig\Environment
|
| $context | array |
array
|
protected arrayToCss (array $rules) : string
Convert a key/value pair array into a CSS string
| Property | Type | Description |
|---|---|---|
| $rules | array |
array
List of rules to process |
protected evalArrDesc (array $variable) : string
Evaluate an array type for description
| Property | Type | Description |
|---|---|---|
| $variable | array |
array
|
protected evalDocBlock (ReflectionClass $reflectionObj) : string
Extracts the comment from a DocBlock
| Property | Type | Description |
|---|---|---|
| $reflectionObj | ReflectionClass |
ReflectionClass
|
protected evalKeyLabel (string $key) : string
Returns a variable name as HTML friendly.
| Property | Type | Description |
|---|---|---|
| $key | string |
string
|
protected evalMethodDesc (object $variable) : string
Evaluate an method type for description
| Property | Type | Description |
|---|---|---|
| $variable | object |
object
|
protected evalObjDesc (array $variable) : string
Evaluate an object type for description
| Property | Type | Description |
|---|---|---|
| $variable | array |
array
|
protected evalObjLabel (object $variable) : string
Evaluate an object type for label
| Property | Type | Description |
|---|---|---|
| $variable | object |
object
|
protected evalToggleDumpOnClick () : string
Builds JavaScript for toggling the dump container
protected evalVarDesc (mixed $variable, $key) : string
Evaluate the variable description
| Property | Type | Description |
|---|---|---|
| $variable | mixed |
mixed
|
| $key | mixed |
mixed
|
protected evalVarDump (mixed $variable) : string
Dumps a variable using HTML Dumper, wrapped in a hidden DIV element.
| Property | Type | Description |
|---|---|---|
| $variable | mixed |
mixed
|
protected evalVarLabel (mixed $variable) : string
Evaluate the variable description
| Property | Type | Description |
|---|---|---|
| $variable | mixed |
mixed
|
protected getContainerCss () : string
Get the CSS string for the output container
protected getDataCss (mixed $variable) : string
Get the CSS string for the output data
| Property | Type | Description |
|---|---|---|
| $variable | mixed |
mixed
|
protected getHeaderCss () : string
Get the CSS string for the output header
protected getSubheaderCss () : string
Get the CSS string for the output subheader
protected getType (object $variable) : string
Evaluate an object type for label
| Property | Type | Description |
|---|---|---|
| $variable | object |
object
|
protected makeTableHeader (mixed $caption) : string
Builds the HTML used for the table header.
| Property | Type | Description |
|---|---|---|
| $caption | mixed |
mixed
Caption [and subcaption] of the dump |
protected makeTableRow (mixed $key, mixed $variable) : string
Builds the HTML used for each table row.
| Property | Type | Description |
|---|---|---|
| $key | mixed |
mixed
|
| $variable | mixed |
mixed
|
protected objectToArray (mixed $object) : array
Returns a map of an object as an array, containing methods and properties.
| Property | Type | Description |
|---|---|---|
| $object | mixed |
mixed
|
protected paginatorToArray (Illuminate\Pagination\Paginator $paginator) : array
Returns default comment information for a paginator object.
| Property | Type | Description |
|---|---|---|
| $paginator | Illuminate\Pagination\Paginator |
Illuminate\Pagination\Paginator
|