From df6360044b5c2396b2bee0dfa9e8d744bfa424d5 Mon Sep 17 00:00:00 2001 From: Igor Scheller Date: Sun, 26 Aug 2018 12:23:47 +0200 Subject: Added Twig template functions --- src/Renderer/Twig/Extensions/Config.php | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 src/Renderer/Twig/Extensions/Config.php (limited to 'src/Renderer/Twig/Extensions/Config.php') diff --git a/src/Renderer/Twig/Extensions/Config.php b/src/Renderer/Twig/Extensions/Config.php new file mode 100644 index 00000000..dbbe93e7 --- /dev/null +++ b/src/Renderer/Twig/Extensions/Config.php @@ -0,0 +1,31 @@ +config = $config; + } + + /** + * @return TwigFunction[] + */ + public function getFunctions() + { + return [ + new TwigFunction('config', [$this->config, 'get']), + ]; + } +} -- cgit v1.2.3-54-g00ecf