Skip to content

Kirby 3.6.6

$layoutcolumns->when()

The when method only executes the given Closure when the first parameter is true. If the first parameter is false, the Closure will not be executed.

$layoutcolumns->when(mixed $condition, Closure $callback, Closure $fallback = null): mixed

Parameters

Name Type Default
$condition * mixed
$callback * Closure
$fallback Closure null

Return type

mixed

Parent class

Kirby\Cms\LayoutColumns inherited from Kirby\Toolkit\Collection