From e910ed5134890c1166643e328cddb29a048c3011 Mon Sep 17 00:00:00 2001 From: Jonathan Treffler Date: Tue, 19 Nov 2024 19:40:36 +0100 Subject: [PATCH] Added friendly name to organization model --- lib/Model/Organization.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/Model/Organization.php b/lib/Model/Organization.php index e028c71..cf45767 100644 --- a/lib/Model/Organization.php +++ b/lib/Model/Organization.php @@ -7,6 +7,7 @@ use OCA\OrganizationFolders\Interface\TableSerializable; class Organization implements \JsonSerializable, TableSerializable { public function __construct( private int $id, + private string $friendlyName, private string $membersGroup, ) { } @@ -15,6 +16,10 @@ class Organization implements \JsonSerializable, TableSerializable { return $this->id; } + public function getFriendlyName(): string { + return $this->friendlyName; + } + public function getMembersGroup(): string { return $this->membersGroup; } @@ -22,6 +27,7 @@ class Organization implements \JsonSerializable, TableSerializable { public function jsonSerialize(): array { return [ 'id' => $this->id, + 'friendlyName' => $this->friendlyName, 'membersGroup' => $this->membersGroup, ]; } @@ -29,6 +35,7 @@ class Organization implements \JsonSerializable, TableSerializable { public function tableSerialize(?array $params = null): array { return [ 'Id' => $this->id, + 'Friendly Name' => $this->friendlyName, 'Members Group' => $this->membersGroup, ]; }