Skip to content

Kirby 5.0.4

$file->files()

Returns the parent Files collection

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

Return type

Kirby\Cms\Files

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

Parent class

Kirby\Cms\File

Examples

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