Skip to content

Kirby 4.4.1

$layoutcolumns->getAttribute()

Extracts an attribute value from the given element in the collection. This is useful if elements in the collection might be objects, arrays or anything else and you need to get the value independently from that. We use it for filter.

$layoutcolumns->getAttribute(array|object $item, string $attribute, bool $split = false, mixed $related = null): mixed

Parameters

Name Type Default
$item * array|object
$attribute * string
$split bool false
$related mixed null

Return type

mixed

Parent class

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