function FilesystemLoader::__construct
Same name in this branch
- 11.1.x core/lib/Drupal/Core/Template/Loader/FilesystemLoader.php \Drupal\Core\Template\Loader\FilesystemLoader::__construct()
Parameters
string|string[] $paths A path or an array of paths where to look for templates:
string|null $rootPath The root path common to all relative paths (null for getcwd()):
4 calls to FilesystemLoader::__construct()
- FilesystemLoader::__construct in core/
lib/ Drupal/ Core/ Template/ Loader/ FilesystemLoader.php - Constructs a new FilesystemLoader object.
- FilesystemLoader::__construct in core/
lib/ Drupal/ Core/ Template/ Loader/ FilesystemLoader.php - Constructs a new FilesystemLoader object.
- HelpTopicTwigLoader::__construct in core/
modules/ help/ src/ HelpTopicTwigLoader.php - Constructs a new HelpTopicTwigLoader object.
- HelpTopicTwigLoader::__construct in core/
modules/ help/ src/ HelpTopicTwigLoader.php - Constructs a new HelpTopicTwigLoader object.
3 methods override FilesystemLoader::__construct()
- FilesystemLoader::__construct in core/
lib/ Drupal/ Core/ Template/ Loader/ FilesystemLoader.php - Constructs a new FilesystemLoader object.
- HelpTopicTwigLoader::__construct in core/
modules/ help/ src/ HelpTopicTwigLoader.php - Constructs a new HelpTopicTwigLoader object.
- ThemeRegistryLoader::__construct in core/
lib/ Drupal/ Core/ Template/ Loader/ ThemeRegistryLoader.php - Constructs a new ThemeRegistryLoader object.
File
-
vendor/
twig/ twig/ src/ Loader/ FilesystemLoader.php, line 40
Class
- FilesystemLoader
- Loads template from the filesystem.
Namespace
Twig\LoaderCode
public function __construct($paths = [], ?string $rootPath = null) {
$this->rootPath = ($rootPath ?? getcwd()) . \DIRECTORY_SEPARATOR;
if (null !== $rootPath && false !== ($realPath = realpath($rootPath))) {
$this->rootPath = $realPath . \DIRECTORY_SEPARATOR;
}
if ($paths) {
$this->setPaths($paths);
}
}