Source: ~/modules/system/twig/Extension.php


  • Twig_Extension


  • Twig_ExtensionInterface

The System Twig extension class implements common Twig functions and filters.

Protected properties

protected System\Classes\MarkupManager $markupManager

A reference to the markup manager instance.

Public methods

public void __construct()

Creates the extension instance.

public string appFilter(mixed $url)

Converts supplied URL to one relative to the website root.

  • mixed $url - Specifies the application-relative URL

public array getFilters()

Returns a list of filters this extensions provides.

public array getFunctions()

Returns a list of functions to add to the existing list.

public array getTokenParsers()

Returns a list of token parsers this extensions provides.

public string mediaFilter(string $file)

Converts supplied file to a URL relative to the media library.

  • string $file - Specifies the media-relative file

Show inherited public methods

Inherited public methods

  • public void getNodeVisitors() - defined in Twig_Extension.
  • public void getOperators() - defined in Twig_Extension.
  • public void getTests() - defined in Twig_Extension.