$file->version()
Returns a content version instance
$file->version(Kirby\Content\VersionId|string|null $versionId = null): Kirby\Content\Version
Parameters
Name | Type | Default |
---|---|---|
$versionId | Kirby\Content\VersionId orstring ornull |
null
|
Return type
Parent class
Kirby\Cms\File
inherited from Kirby\Cms\ModelWithContent
Examples
// get the latest saved content of a file
$file->version('latest');
// get all unsaved changes
$file->version('changes');