public function Twig_Loader_Filesystem::setPaths

Sets the paths where templates are stored.

Parameters

string|array $paths A path or an array of paths where to look for templates:

string $namespace A path namespace:

1 call to Twig_Loader_Filesystem::setPaths()
Twig_Loader_Filesystem::__construct in drupal/core/vendor/twig/twig/lib/Twig/Loader/Filesystem.php
Constructor.

File

drupal/core/vendor/twig/twig/lib/Twig/Loader/Filesystem.php, line 62

Class

Twig_Loader_Filesystem
Loads template from the filesystem.

Code

public function setPaths($paths, $namespace = '__main__') {
  if (!is_array($paths)) {
    $paths = array(
      $paths,
    );
  }
  $this->paths[$namespace] = array();
  foreach ($paths as $path) {
    $this
      ->addPath($path, $namespace);
  }
}