• Twig\Extension\AbstractExtension


  • Twig\Extension\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 void resizeFilter($image, $width=NULL, $height=NULL, $options=array())

resizeFilter converts supplied input into a URL that will return the desired resized image. The image can be either a file model, absolute path, or URL.

  • $image
  • $width
  • $height
  • $options

Show inherited public methods

Inherited public methods

  • public void getNodeVisitors() - defined in Twig\Extension\AbstractExtension.
  • public void getOperators() - defined in Twig\Extension\AbstractExtension.
  • public void getTests() - defined in Twig\Extension\AbstractExtension.