ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Exposes useful tools for working with/in templates. More...
Public Member Functions | |
__construct () | |
escape ($raw) | |
Escapes a string for output in an HTML document. More... | |
escapeButPreserveUris ($raw) | |
Escapes a string for output in an HTML document, but preserves URIs within it, and converts them to clickable anchor elements. More... | |
breakOnDelimiter ($delimiter, $s) | |
Makes sure that the given string breaks on the delimiter. More... | |
shorten ($path) | |
Replace the part of the path that all files have in common. More... | |
dump ($value) | |
Format the given value into a human readable string. More... | |
dumpArgs (Frame $frame) | |
Format the args of the given Frame as a human readable html string. More... | |
slug ($original) | |
Convert a string to a slug version of itself. More... | |
render ($template, array $additionalVariables=null) | |
Given a template path, render it within its own scope. More... | |
setVariables (array $variables) | |
Sets the variables to be passed to all templates rendered by this template helper. More... | |
setVariable ($variableName, $variableValue) | |
Sets a single template variable, by its name: More... | |
getVariable ($variableName, $defaultValue=null) | |
Gets a single template variable, by its name, or $defaultValue if the variable does not exist. More... | |
delVariable ($variableName) | |
Unsets a single template variable, by its name. More... | |
getVariables () | |
Returns all variables for this helper. More... | |
setCloner ($cloner) | |
Set the cloner used for dumping variables. More... | |
getCloner () | |
Get the cloner used for dumping variables. More... | |
setApplicationRootPath ($applicationRootPath) | |
Set the application root path. More... | |
getApplicationRootPath () | |
Return the application root path. More... | |
Private Member Functions | |
getDumper () | |
Private Attributes | |
$variables = [] | |
$htmlDumper | |
$htmlDumperOutput | |
$cloner | |
$applicationRootPath | |
Exposes useful tools for working with/in templates.
Definition at line 18 of file TemplateHelper.php.
Whoops\Util\TemplateHelper::__construct | ( | ) |
Definition at line 46 of file TemplateHelper.php.
Whoops\Util\TemplateHelper::breakOnDelimiter | ( | $delimiter, | |
$s | |||
) |
Makes sure that the given string breaks on the delimiter.
string | $delimiter | |
string | $s |
Definition at line 103 of file TemplateHelper.php.
References $delimiter, and $s.
Whoops\Util\TemplateHelper::delVariable | ( | $variableName | ) |
Unsets a single template variable, by its name.
string | $variableName |
Definition at line 295 of file TemplateHelper.php.
Whoops\Util\TemplateHelper::dump | ( | $value | ) |
Format the given value into a human readable string.
mixed | $value |
Definition at line 161 of file TemplateHelper.php.
References Sabre\VObject\$output, Whoops\Util\TemplateHelper\getCloner(), and Whoops\Util\TemplateHelper\getDumper().
Referenced by Whoops\Util\TemplateHelper\dumpArgs().
Whoops\Util\TemplateHelper::dumpArgs | ( | Frame | $frame | ) |
Format the args of the given Frame as a human readable html string.
Frame | $frame |
Definition at line 195 of file TemplateHelper.php.
References $html, Whoops\Util\TemplateHelper\dump(), Whoops\Exception\Frame\getArgs(), and Whoops\Util\TemplateHelper\getDumper().
Whoops\Util\TemplateHelper::escape | ( | $raw | ) |
Escapes a string for output in an HTML document.
string | $raw |
Definition at line 58 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\escapeButPreserveUris().
Whoops\Util\TemplateHelper::escapeButPreserveUris | ( | $raw | ) |
Escapes a string for output in an HTML document, but preserves URIs within it, and converts them to clickable anchor elements.
string | $raw |
Definition at line 86 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\escape().
Whoops\Util\TemplateHelper::getApplicationRootPath | ( | ) |
Return the application root path.
Definition at line 348 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$applicationRootPath.
Whoops\Util\TemplateHelper::getCloner | ( | ) |
Get the cloner used for dumping variables.
Definition at line 325 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$cloner.
Referenced by Whoops\Util\TemplateHelper\dump().
|
private |
Definition at line 128 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$htmlDumper.
Referenced by Whoops\Util\TemplateHelper\dump(), and Whoops\Util\TemplateHelper\dumpArgs().
Whoops\Util\TemplateHelper::getVariable | ( | $variableName, | |
$defaultValue = null |
|||
) |
Gets a single template variable, by its name, or $defaultValue if the variable does not exist.
string | $variableName | |
mixed | $defaultValue |
Definition at line 284 of file TemplateHelper.php.
Whoops\Util\TemplateHelper::getVariables | ( | ) |
Returns all variables for this helper.
Definition at line 305 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$variables.
Referenced by Whoops\Util\TemplateHelper\render().
Whoops\Util\TemplateHelper::render | ( | $template, | |
array | $additionalVariables = null |
||
) |
Given a template path, render it within its own scope.
This method also accepts an array of additional variables to be passed to the template.
string | $template | |
array | $additionalVariables |
Definition at line 237 of file TemplateHelper.php.
References $template, Whoops\Util\TemplateHelper\$variables, and Whoops\Util\TemplateHelper\getVariables().
Whoops\Util\TemplateHelper::setApplicationRootPath | ( | $applicationRootPath | ) |
Set the application root path.
string | $applicationRootPath |
Definition at line 338 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$applicationRootPath.
Whoops\Util\TemplateHelper::setCloner | ( | $cloner | ) |
Set the cloner used for dumping variables.
AbstractCloner | $cloner |
Definition at line 315 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$cloner.
Whoops\Util\TemplateHelper::setVariable | ( | $variableName, | |
$variableValue | |||
) |
Sets a single template variable, by its name:
string | $variableName | |
mixed | $variableValue |
Definition at line 271 of file TemplateHelper.php.
Whoops\Util\TemplateHelper::setVariables | ( | array | $variables | ) |
Sets the variables to be passed to all templates rendered by this template helper.
array | $variables |
Definition at line 260 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$variables.
Whoops\Util\TemplateHelper::shorten | ( | $path | ) |
Replace the part of the path that all files have in common.
string | $path |
Definition at line 119 of file TemplateHelper.php.
References $path.
Whoops\Util\TemplateHelper::slug | ( | $original | ) |
Convert a string to a slug version of itself.
string | $original |
Definition at line 222 of file TemplateHelper.php.
|
private |
Definition at line 44 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\getApplicationRootPath(), and Whoops\Util\TemplateHelper\setApplicationRootPath().
|
private |
Definition at line 39 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\getCloner(), and Whoops\Util\TemplateHelper\setCloner().
|
private |
Definition at line 29 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\getDumper().
|
private |
Definition at line 34 of file TemplateHelper.php.
|
private |
Definition at line 24 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\getVariables(), Whoops\Util\TemplateHelper\render(), and Whoops\Util\TemplateHelper\setVariables().