public function StringLoader::getSource

public StringLoader::getSource($name)

Gets the source code of a template, given its name.

Parameters

string $name The name of the template to load:

Return value

string The template source code

Throws

Twig_Error_Loader When $name is not found

Overrides Twig_LoaderInterface::getSource

File

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

Class

StringLoader
Loads string templates, also known as inline templates.

Namespace

Drupal\Core\Template\Loader

Code

public function getSource($name) {
  return $name;
}

© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Template!Loader!StringLoader.php/function/StringLoader::getSource/8.1.x