Upgrade to 4.5.0
This commit is contained in:
@@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user