diff options
| author | Thomas Hackl <hackl@data-quest.de> | 2026-01-07 14:39:31 +0100 |
|---|---|---|
| committer | Thomas Hackl <hackl@data-quest.de> | 2026-01-07 14:39:31 +0100 |
| commit | 5a28d77e9a28138f42312d62f1c5ec92310ae865 (patch) | |
| tree | 26a45f2ba46ac1de4d5fd4accd5c8ea5efa40ae2 /lib | |
| parent | 4f00fb8d9fea5ceead39a8145ac10d859ebdd287 (diff) | |
Resolve "Kurz-URLs: Nach Erstellung wird der Link nicht in die Zwischenablage kopiert"
Closes #6121
Merge request studip/studip!4652
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/JsonApi/Schemas/ShortUrl.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/classes/JsonApi/Schemas/ShortUrl.php b/lib/classes/JsonApi/Schemas/ShortUrl.php index ff7e90b..0313bf4 100644 --- a/lib/classes/JsonApi/Schemas/ShortUrl.php +++ b/lib/classes/JsonApi/Schemas/ShortUrl.php @@ -19,6 +19,24 @@ final class ShortUrl extends SchemaProvider } /** + * @param \Forum\Category $resource + */ + public function hasResourceMeta($resource): bool + { + return true; + } + + /** + * @param \Forum\Category $resource + */ + public function getResourceMeta($resource) + { + return [ + 'alias-link' => \URLHelper::getLink('dispatch.php/u/r/' . $resource->alias, [], true) + ]; + } + + /** * @param \ShortUrl $resource */ public function getAttributes($resource, ContextInterface $context): iterable |
