Added a new http_status_code Twig function

This commit is contained in:
Andy Miller
2017-10-02 17:33:43 -06:00
parent 28b8628438
commit 680a6c8983
2 changed files with 3 additions and 1 deletions

View File

@@ -1,8 +1,9 @@
# v1.3.5
## 09/30/2017
## xx/xx/2017
1. [](#improved)
* Updated `bin/grav clean` command to remove unnecessary vendor files (save some bytes)
* Added a `http_status_code` Twig function to allow setting HTTP status codes from Twig directly.
# v1.3.4
## 09/29/2017

View File

@@ -122,6 +122,7 @@ class TwigExtension extends \Twig_Extension
new \Twig_SimpleFunction('dump', [$this, 'dump'], ['needs_context' => true, 'needs_environment' => true]),
new \Twig_SimpleFunction('vardump', [$this, 'vardumpFunc']),
new \Twig_SimpleFunction('print_r', 'print_r'),
new \Twig_SimpleFunction('http_response_code', 'http_response_code'),
new \Twig_SimpleFunction('evaluate', [$this, 'evaluateStringFunc'], ['needs_context' => true, 'needs_environment' => true]),
new \Twig_SimpleFunction('evaluate_twig', [$this, 'evaluateTwigFunc'], ['needs_context' => true, 'needs_environment' => true]),
new \Twig_SimpleFunction('gist', [$this, 'gistFunc']),