Skip to content

Kirby 6.0.0

$collection->has()

Checks if the given object or id is in the collection

$collection->has(string|mixed $key): bool

Parameters

Name Type Default
$keyrequired stringormixed no default value

Return type

bool

Parent class

Kirby\Cms\Collection