You are here

public function StringLoader::getSourceContext in Drupal 8

Same name and namespace in other branches
  1. 9 core/lib/Drupal/Core/Template/Loader/StringLoader.php \Drupal\Core\Template\Loader\StringLoader::getSourceContext()
  2. 10 core/lib/Drupal/Core/Template/Loader/StringLoader.php \Drupal\Core\Template\Loader\StringLoader::getSourceContext()

File

core/lib/Drupal/Core/Template/Loader/StringLoader.php, line 65

Class

StringLoader
Loads string templates, also known as inline templates.

Namespace

Drupal\Core\Template\Loader

Code

public function getSourceContext($name) {
  $name = (string) $name;
  return new Source($name, $name);
}