Documentation

EvaluateFilterExtension
in package

A twig extension that will add an "evaluate" filter, for dynamic evaluation.

Table of Contents

Methods

evaluate()  : mixed
This function will evaluate $string through the $environment, and return its results.
getFilter()  : TwigFilter
Attaches the innervars filter to the Twig Environment.
parseString()  : string
Sets the parser for the environment to Twig_Loader_String, and parsed the string $string.

Methods

evaluate()

This function will evaluate $string through the $environment, and return its results.

public static evaluate(Environment $environment, array<string|int, mixed> $context, string $string) : mixed
Parameters
$environment : Environment
$context : array<string|int, mixed>
$string : string

getFilter()

Attaches the innervars filter to the Twig Environment.

public static getFilter() : TwigFilter
Return values
TwigFilter

parseString()

Sets the parser for the environment to Twig_Loader_String, and parsed the string $string.

public static parseString(Twig_Environment $environment, array<string|int, mixed> $context, string $string) : string
Parameters
$environment : Twig_Environment
$context : array<string|int, mixed>
$string : string
Return values
string

        
On this page

Search results