Commit 5adf95a9 authored by webchick's avatar webchick

Issue #2563821 by dawehner: Implement Twig_Loader_String for ourselves

parent 570fba20
......@@ -25,7 +25,7 @@
* @see \Drupal\Core\Render\Element\InlineTemplate
* @see twig_render_template()
*/
class StringLoader extends \Twig_Loader_String {
class StringLoader implements \Twig_LoaderInterface, \Twig_ExistsLoaderInterface {
/**
* {@inheritdoc}
......@@ -39,4 +39,25 @@ public function exists($name) {
}
}
/**
* {@inheritdoc}
*/
public function getSource($name) {
return $name;
}
/**
* {@inheritdoc}
*/
public function getCacheKey($name) {
return $name;
}
/**
* {@inheritdoc}
*/
public function isFresh($name, $time) {
return true;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment