Skip to content

Kirby 3.9.8

$files->intersects()

Checks if there is an intersection between the given collection and this collection

$files->intersects(\Kirby\Toolkit\Collection $other): bool

Parameters

Name Type Default
$other * Kirby\Toolkit\Collection

Return type

bool

Parent class

Kirby\Cms\Files inherited from Kirby\Toolkit\Collection

Example

$images1 = $page->files()->template('cover');
$images2 = $site->files()->template('cover');

if ($images1->intersects($images2) {
    // do something
};