You are here

public function ComponentsLoader::addPath in Components! 8.2

File

src/Template/Loader/ComponentsLoader.php, line 201

Class

ComponentsLoader
Loads templates from the filesystem.

Namespace

Drupal\components\Template\Loader

Code

public function addPath($path, $namespace = self::MAIN_NAMESPACE) {

  // Invalidate the cache.
  $this->cache = $this->errorCache = [];
  $this->paths[$namespace][] = rtrim($path, '/\\');
}