diff options
| author | Rami Jasim <minecraftmrgold@gmail.com> | 2025-12-17 09:19:17 +0000 |
|---|---|---|
| committer | Rami Jasim <minecraftmrgold@gmail.com> | 2025-12-17 09:19:17 +0000 |
| commit | 9ab2f4aa874b1015ecc3ac5c24672956176fd789 (patch) | |
| tree | 930490e379d48fe4696e262b00c9a9ed331446d3 /lib/classes | |
| parent | 61b2e2ba3271a911308f80fcbe2073852312bf80 (diff) | |
add `inst-type` (type) to JSON-API Institute Schema
Closes #6118
Merge request studip/studip!4650
Diffstat (limited to 'lib/classes')
| -rw-r--r-- | lib/classes/JsonApi/Schemas/Institute.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lib/classes/JsonApi/Schemas/Institute.php b/lib/classes/JsonApi/Schemas/Institute.php index 61058f7..b67e3b6 100644 --- a/lib/classes/JsonApi/Schemas/Institute.php +++ b/lib/classes/JsonApi/Schemas/Institute.php @@ -32,15 +32,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' => (string) $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' => (string) $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), ]; } |
