mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-11-21 20:28:11 +01:00
add jsonSerialize to Organization and OrganizationRole
This commit is contained in:
parent
936f52c61f
commit
38b1406d40
2 changed files with 16 additions and 0 deletions
|
@ -16,4 +16,11 @@ class Organization implements \JsonSerializable {
|
|||
public function getMembersGroup(): string {
|
||||
return $this->membersGroup;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'membersGroup' => $this->membersGroup,
|
||||
];
|
||||
}
|
||||
}
|
|
@ -26,4 +26,13 @@ class OrganizationRole implements \JsonSerializable {
|
|||
public function getMembersGroup(): string {
|
||||
return $this->membersGroup;
|
||||
}
|
||||
|
||||
public function jsonSerialize(): array {
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'organizationId' => $this->organizationId,
|
||||
'friendlyName' => $this->friendlyName,
|
||||
'membersGroup' => $this->membersGroup,
|
||||
];
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue