public function Twig_Loader_Chain::getSource

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

Overrides Twig_LoaderInterface::getSource

File

drupal/core/vendor/twig/twig/lib/Twig/Loader/Chain.php, line 52

Class

Twig_Loader_Chain
Loads templates from other loaders.

Code

public function getSource($name) {
  foreach ($this->loaders as $loader) {
    try {
      return $loader
        ->getSource($name);
    } catch (Twig_Error_Loader $e) {
    }
  }
  throw new Twig_Error_Loader(sprintf('Template "%s" is not defined.', $name));
}