Skip to content

Kirby 5.2.1

$defaultVisitor->ternary()

Processes ternary operator

$defaultVisitor->ternary() 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->ternary(mixed $condition, mixed $true, mixed $false): mixed

Parameters

Name Type Default
$conditionrequired mixed no default value
$truerequired mixed no default value
$falserequired mixed no default value

Return type

mixed

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

Parent class

Kirby\Query\Visitors\DefaultVisitor