aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRami Jasim <minecraftmrgold@gmail.com>2025-12-17 09:19:17 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2026-01-16 12:32:36 +0100
commit6af7f2af74c8249f3eebd83904a12850498b25f1 (patch)
treed50bad05e170e428b9e930340e3f5838093282fd /lib
parent293b52b6624699ecb36b4bf54e492ce8840a31c5 (diff)
add `inst-type` (type) to JSON-API Institute Schema
Closes #6118 Merge request studip/studip!4650
Diffstat (limited to 'lib')
-rw-r--r--lib/classes/JsonApi/Schemas/Institute.php20
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/classes/JsonApi/Schemas/Institute.php b/lib/classes/JsonApi/Schemas/Institute.php
index 56af66e..1eb7261 100644
--- a/lib/classes/JsonApi/Schemas/Institute.php
+++ b/lib/classes/JsonApi/Schemas/Institute.php
@@ -30,15 +30,17 @@ class Institute extends SchemaProvider
public function getAttributes($institute, ContextInterface $context): iterable
{
return [
- 'name' => (string) $institute->name,
- 'city' => $institute->plz,
- 'street' => $institute->strasse,
- 'phone' => $institute->telefon,
- 'fax' => $institute->fax,
- 'url' => $institute->url,
- 'is-faculty' => $institute->is_fak,
- 'mkdate' => date('c', $institute->mkdate),
- 'chdate' => date('c', $institute->chdate),
+ 'name' => (string) $institute->name,
+ 'city' => $institute->plz,
+ 'street' => $institute->strasse,
+ 'phone' => $institute->telefon,
+ 'fax' => $institute->fax,
+ 'url' => $institute->url,
+ 'is-faculty' => $institute->is_fak,
+ 'inst-type' => $institute->type,
+ 'inst-type-name' => $GLOBALS['INST_TYPE'][$institute->type]['name'],
+ 'mkdate' => date('c', $institute->mkdate),
+ 'chdate' => date('c', $institute->chdate),
];
}