Skip to content

Kirby 6.0.1

$nestCollection->findBy()

Find a single element by an attribute and its value

$nestCollection->findBy(string $attribute, mixed $value): NestCollection|NestObject|Field|null

Parameters

Name Type Default
$attributerequired string no default value
$valuerequired mixed no default value

Return types

Kirby\Cms\NestCollectionorKirby\Cms\NestObjectorKirby\Content\Fieldornull

Parent class

Kirby\Cms\NestCollection inherited from Kirby\Toolkit\Collection