$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 |
---|---|---|
$otherrequired | Kirby\Toolkit\Collection |
no default value |
Return type
bool
This method modifies the existing $files
object it is applied to and returns it again.
Parent class
Kirby\Cms\Files
inherited from Kirby\Toolkit\Collection
Examples
$images1 = $page->files()->template('cover');
$images2 = $site->files()->template('cover');
if ($images1->intersects($images2) {
// do something
};