mirror of
https://github.com/getgrav/grav.git
synced 2026-05-06 16:47:30 +02:00
Added template_from_string() twig function
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
* Added `Flex Pages` to Grav core and removed Flex Objects plugin dependency
|
||||
* Added `Utils::simpleTemplate()` method for very simple variable templating
|
||||
* Added `array_diff()` twig function
|
||||
* Added `template_from_string()` twig function
|
||||
1. [](#improved)
|
||||
* Improved `Flex Users`: obey blueprints and allow Flex to be used in admin only
|
||||
* Improved `Flex` to support custom site template paths
|
||||
|
||||
@@ -23,6 +23,7 @@ use Twig\Environment;
|
||||
use Twig\Error\LoaderError;
|
||||
use Twig\Extension\CoreExtension;
|
||||
use Twig\Extension\DebugExtension;
|
||||
use Twig\Extension\StringLoaderExtension;
|
||||
use Twig\Loader\ArrayLoader;
|
||||
use Twig\Loader\ChainLoader;
|
||||
use Twig\Loader\FilesystemLoader;
|
||||
@@ -198,6 +199,7 @@ class Twig
|
||||
}
|
||||
$this->twig->addExtension(new TwigExtension());
|
||||
$this->twig->addExtension(new DeferredExtension());
|
||||
$this->twig->addExtension(new StringLoaderExtension());
|
||||
|
||||
$this->profile = new \Twig\Profiler\Profile();
|
||||
$this->twig->addExtension(new \Twig\Extension\ProfilerExtension($this->profile));
|
||||
|
||||
Reference in New Issue
Block a user