$hasFiles->file()
Returns a specific file by filename or the first one
$hasFiles->file(string|null $filename = null, string $in = 'files'): Kirby\Cms\File|null
Parameters
Name | Type | Default |
---|---|---|
$filename | string ornull |
null
|
$in | string |
'files'
|
Return types
Kirby\Cms\File
ornull
This method modifies the existing $hasfiles
object it is applied to and returns it again.
Parent class
Kirby\Cms\HasFiles