Upgrade to 4.5.0

This commit is contained in:
Bastian Allgeier
2024-11-28 11:24:28 +01:00
parent 49287c7a5e
commit 63ddf40692
86 changed files with 942 additions and 491 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();
}
}