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

Breadcrumb

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

function ChainLoader::exists

Overrides LoaderInterface::exists

File

vendor/twig/twig/src/Loader/ChainLoader.php, line 80

Class

ChainLoader
Loads templates from other loaders.

Namespace

Twig\Loader

Code

public function exists(string $name) : bool {
    if (isset($this->hasSourceCache[$name])) {
        return $this->hasSourceCache[$name];
    }
    foreach ($this->getLoaders() as $loader) {
        if ($loader->exists($name)) {
            return $this->hasSourceCache[$name] = true;
        }
    }
    return $this->hasSourceCache[$name] = false;
}
RSS feed
Powered by Drupal