mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-12-06 11:22:41 +01:00
Added friendly name to organization model
This commit is contained in:
parent
f07b9953e3
commit
e910ed5134
1 changed files with 7 additions and 0 deletions
|
@ -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,
|
||||
];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue