Issue #2563821 by dawehner: Implement Twig_Loader_String for ourselves

8.0.x
webchick 2015-09-09 22:58:31 -07:00
parent 570fba20cd
commit 5adf95a9bb
1 changed files with 22 additions and 1 deletions

View File

@ -25,7 +25,7 @@ namespace Drupal\Core\Template\Loader;
* @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 @@ class StringLoader extends \Twig_Loader_String {
}
}
/**
* {@inheritdoc}
*/
public function getSource($name) {
return $name;
}
/**
* {@inheritdoc}
*/
public function getCacheKey($name) {
return $name;
}
/**
* {@inheritdoc}
*/
public function isFresh($name, $time) {
return true;
}
}