System\Twig\Loader

Implements:

  • Twig\Loader\LoaderInterface

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

Protected properties

protected array $cache

Cache

Public methods

public void addCacheItem($name)

addCache adds a specific item to cache.

Parameters
  • $name

public void exists($name)

Checks that the template exists.

Parameters
  • $name

public void getCacheKey($name)

Returns the Twig cache key.

Parameters
  • $name

public void getFilename($name)

Returns the file name of the loaded template.

Parameters
  • $name

public void getSourceContext($name)

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

Parameters
  • $name

public void isFresh($name, $time)

Determines if the content is fresh.

Parameters
  • $name
  • $time

Protected methods

protected string findTemplate(string $name)

Gets the path of a view file

Parameters
  • string $name