Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. FilesystemLoader.php

function FilesystemLoader::setPaths

Parameters

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

1 call to FilesystemLoader::setPaths()
FilesystemLoader::__construct in vendor/twig/twig/src/Loader/FilesystemLoader.php

File

vendor/twig/twig/src/Loader/FilesystemLoader.php, line 77

Class

FilesystemLoader
Loads template from the filesystem.

Namespace

Twig\Loader

Code

public function setPaths($paths, string $namespace = self::MAIN_NAMESPACE) : void {
    if (!\is_array($paths)) {
        $paths = [
            $paths,
        ];
    }
    $this->paths[$namespace] = [];
    foreach ($paths as $path) {
        $this->addPath($path, $namespace);
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal