Add jsonSerialize method to RelationalEntity

Signed-off-by: Julius Haertl <jus@bitgrid.net>
This commit is contained in:
Julius Haertl
2017-03-05 13:43:54 +01:00
committed by Julius Härtl
parent 3324556542
commit 34c1a681b1
8 changed files with 45 additions and 70 deletions

View File

@@ -71,16 +71,9 @@ class Acl extends RelationalEntity implements \JsonSerializable {
}
public function jsonSerialize() {
return [
'id' => $this->id,
'participant' => $this->participant,
'type' => $this->getTypeString(),
'boardId' => $this->boardId,
'permissionEdit' => $this->getPermissionEdit(),
'permissionShare' => $this->getPermissionShare(),
'permissionManage' => $this->getPermissionManage(),
'owner' => $this->getOwner()
];
$json = parent::jsonSerialize();
$json['type'] = $this->getTypeString();
return $json;
}
public function getTypeString() {