mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-12-06 11:22:41 +01:00
added resource occ commands
This commit is contained in:
parent
0f81059343
commit
840fd70c37
8 changed files with 169 additions and 2 deletions
|
@ -47,4 +47,22 @@ class FolderResource extends Resource {
|
|||
'inheritedAclPermission' => $this->inheritedAclPermission,
|
||||
];
|
||||
}
|
||||
|
||||
public function tableSerialize(): array {
|
||||
return [
|
||||
'Id' => $this->id,
|
||||
'Name' => $this->name,
|
||||
'Type' => "Folder",
|
||||
'Active' => ((bool)$this->active) ? 'yes' : 'no',
|
||||
'Last Updated' => $this->lastUpdatedTimestamp,
|
||||
|
||||
'Members ACL Permission' => $this->membersAclPermission,
|
||||
'Managers ACL Permission' => $this->managersAclPermission,
|
||||
'Inherited ACL Permission' => $this->inheritedAclPermission,
|
||||
];
|
||||
}
|
||||
|
||||
public function getType(): string {
|
||||
return "folder";
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,10 +3,11 @@
|
|||
namespace OCA\OrganizationFolders\Db;
|
||||
|
||||
use JsonSerializable;
|
||||
use OCA\OrganizationFolders\Interface\TableSerializable;
|
||||
|
||||
use OCP\AppFramework\Db\Entity;
|
||||
|
||||
abstract class Resource extends Entity implements JsonSerializable {
|
||||
abstract class Resource extends Entity implements JsonSerializable, TableSerializable {
|
||||
protected $organizationFolderId;
|
||||
protected $parentResource;
|
||||
protected $name;
|
||||
|
@ -19,4 +20,6 @@ abstract class Resource extends Entity implements JsonSerializable {
|
|||
$this->addType('active','bool');
|
||||
$this->addType('lastUpdatedTimestamp','integer');
|
||||
}
|
||||
|
||||
abstract public function getType(): string;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue