Utility
class Utility (View source)
Utility to reduce boilerplate code needed to set default context variables and evaluate a string that possibly is an EEL expression.
Methods
static string|null
parseEelExpression(string $expression)
Return the expression if it is a valid EEL expression, null otherwise.
static array
getDefaultContextVariables(array $configuration)
Get variables from configuration that should be set in the context by default.
static mixed
evaluateEelExpression(string $expression, EelEvaluatorInterface $eelEvaluator, array $contextVariables, array $defaultContextConfiguration = [], EelInvocationTracerInterface|null $tracer = null)
Evaluate an Eel expression.
Details
static string|null
parseEelExpression(string $expression)
Return the expression if it is a valid EEL expression, null otherwise.
static array
getDefaultContextVariables(array $configuration)
Get variables from configuration that should be set in the context by default.
For example Eel helpers are made available by this.
static mixed
evaluateEelExpression(string $expression, EelEvaluatorInterface $eelEvaluator, array $contextVariables, array $defaultContextConfiguration = [], EelInvocationTracerInterface|null $tracer = null)
Evaluate an Eel expression.