System\Twig\Loader

Overview

This class implements a Twig template loader for the core system and backend.

Implements
  • Twig\Loader\LoaderInterface

Protected Properties

protected array $cache

Cache


Public Methods

public addCacheItem()

public addCacheItem($name): void 

addCache adds a specific item to cache.

public exists()

public exists($name): void

Checks that the template exists.

public getCacheKey()

public getCacheKey($name): string 

Returns the Twig cache key.

public getFilename()

public getFilename($name): void

Returns the file name of the loaded template.

public getSourceContext()

public getSourceContext($name): Twig\Source 

Returns the Twig content string. This step is cached internally by Twig.

public isFresh()

public isFresh($name, $time): bool 

Determines if the content is fresh.

Protected Methods

protected findTemplate()

protected findTemplate(string $name): string 

Gets the path of a view file