Skip to content

Kirby 5.2.1

$defaultVisitor->closure()

Processes node into actual closure

$defaultVisitor->closure() has been marked as unstable. It might be changed in a future Kirby major or minor release without being considered a breaking change. Use with caution.

$defaultVisitor->closure(Kirby\Query\AST\ClosureNode $node): Closure

Parameters

Name Type Default
$noderequired Kirby\Query\AST\ClosureNode no default value

Return type

Closure

This method modifies the existing $defaultvisitor object it is applied to and returns it again.

Parent class

Kirby\Query\Visitors\DefaultVisitor