diff options
Diffstat (limited to 'core/View.php')
-rw-r--r-- | core/View.php | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/core/View.php b/core/View.php index 9fac3137f0..bf17b80926 100644 --- a/core/View.php +++ b/core/View.php @@ -214,6 +214,16 @@ class View implements ViewInterface return isset($this->templateVars[$name]); } + /** + * Unsets a template variable. + * + * @param string $name The name of the template variable. + */ + public function __unset($name) + { + unset($this->templateVars[$name]); + } + /** @var Twig */ static $twigCached = null; |