Skip to content

Kirby 4.4.1

$file->files()

Returns the parent Files collection

$file->files(): Kirby\Cms\Files

Return type

Kirby\Cms\Files

Parent class

Kirby\Cms\File

Example

if($file = $page->files()->first()) {
    echo 'The first file in the collection is: ' . $file->title();
}