Skip to content
Snippets Groups Projects
Commit 5adf95a9 authored by Angie Byron's avatar Angie Byron
Browse files

Issue #2563821 by dawehner: Implement Twig_Loader_String for ourselves

parent 570fba20
No related branches found
No related tags found
No related merge requests found
......@@ -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;
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment