fix #72 - update to Kirby 4.5

This commit is contained in:
isUnknown 2025-01-07 16:59:31 +01:00
parent cb1f842fc9
commit 44d08b3e21
273 changed files with 678 additions and 54176 deletions

View file

@ -3,6 +3,7 @@
namespace Kirby\Uuid;
use Generator;
use Kirby\Cms\App;
use Kirby\Cms\File;
/**
@ -83,4 +84,18 @@ class FileUuid extends ModelUuid
'filename' => $model->filename()
];
}
/**
* Returns permalink url
*/
public function url(): string
{
// make sure UUID is cached because the permalink
// route only looks up UUIDs from cache
if ($this->isCached() === false) {
$this->populate();
}
return App::instance()->url() . '/@/' . static::TYPE . '/' . $this->id();
}
}