Environment
- Type
- Class
- Namespace
- craft\web\twig
- Inherits
- craft\web\twig\Environment ยป
Twig\Environment
- Since
- 3.0.0
Base Twig template class.
View source (opens new window)
# Public Methods
Method | Description |
---|---|
__construct() | |
compileSource() | |
getDefaultEscaperStrategy() | Returns the default escaper strategy to use based on the template name. |
setDefaultEscaperStrategy() |
# __construct()
View source (opens new window)
Arguments
$loader
$options
# compileSource()
View source (opens new window)
Arguments
$source
# getDefaultEscaperStrategy()
Returns the default escaper strategy to use based on the template name.
View source (opens new window)
Arguments
$name
(string (opens new window))
Returns
string (opens new window), false (opens new window)
# setDefaultEscaperStrategy()
View source (opens new window)
Arguments
$strategy
(mixed
) โ The escaper strategy to set. If null, it will be determined based on the template name.
โ CpExtension Extension โ