System\Twig\Extension

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

Extends:

  • Twig_Extension

Implements:

  • 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.

Parameters
  • 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.

Parameters
  • 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.