|
ILIAS
release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
|
Exposes useful tools for working with/in templates. More...
Collaboration diagram for Whoops\Util\TemplateHelper:Public Member Functions | |
| 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... | |
| 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... | |
Private Attributes | |
| $variables = array() | |
Exposes useful tools for working with/in templates.
Definition at line 12 of file TemplateHelper.php.
| Whoops\Util\TemplateHelper::delVariable | ( | $variableName | ) |
Unsets a single template variable, by its name.
| string | $variableName |
Definition at line 140 of file TemplateHelper.php.
| Whoops\Util\TemplateHelper::escape | ( | $raw | ) |
Escapes a string for output in an HTML document.
| string | $raw |
Definition at line 26 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\escapeButPreserveUris().
Here is the caller graph for this function:| 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 52 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\escape().
Here is the call graph for this function:| 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 129 of file TemplateHelper.php.
| Whoops\Util\TemplateHelper::getVariables | ( | ) |
Returns all variables for this helper.
Definition at line 150 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$variables.
Referenced by Whoops\Util\TemplateHelper\render().
Here is the caller graph for this function:| 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 82 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$variables, and Whoops\Util\TemplateHelper\getVariables().
Here is the call graph for this function:| Whoops\Util\TemplateHelper::setVariable | ( | $variableName, | |
| $variableValue | |||
| ) |
Sets a single template variable, by its name:
| string | $variableName | |
| mixd | $variableValue |
Definition at line 116 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 105 of file TemplateHelper.php.
References Whoops\Util\TemplateHelper\$variables.
| Whoops\Util\TemplateHelper::slug | ( | $original | ) |
Convert a string to a slug version of itself.
| string | $original |
Definition at line 67 of file TemplateHelper.php.
|
private |
Definition at line 18 of file TemplateHelper.php.
Referenced by Whoops\Util\TemplateHelper\getVariables(), Whoops\Util\TemplateHelper\render(), and Whoops\Util\TemplateHelper\setVariables().