Skip to content

Kirby 5.1.2

$items->has()

Checks if the given object or id is in the collection

$items->has(string|Kirby\Cms\Item $key): bool

Parameters

Name Type Default
$keyrequired stringorKirby\Cms\Item no default value

Return type

bool

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

Parent class

Kirby\Cms\Items inherited from Kirby\Cms\Collection