mirror of
https://github.com/verdigado/organization_folders.git
synced 2024-12-06 11:22:41 +01:00
use new more versatile tag query methods
This commit is contained in:
parent
82d95da322
commit
79a1c1e9f3
3 changed files with 19 additions and 5 deletions
|
@ -24,13 +24,21 @@ class OrganizationFolderService {
|
|||
) {
|
||||
}
|
||||
|
||||
public function getAll() {
|
||||
public function findAll() {
|
||||
$result = [];
|
||||
|
||||
$tags = $this->tagService->findAllIncludingGroupfolder("organization_folder");
|
||||
$groupfolders = $this->tagService->findGroupfoldersWithTagsGenerator([
|
||||
["key" => "organization_folder"],
|
||||
], ["organization_provider", "organization_id"]);
|
||||
|
||||
foreach ($tags as $tag) {
|
||||
$result[] = new OrganizationFolder($tag["group_folder_id"], $tag["mount_point"], $tag["quota"]);
|
||||
foreach ($groupfolders as $groupfolder) {
|
||||
$result[] = new OrganizationFolder(
|
||||
id: $groupfolder["id"],
|
||||
name: $groupfolder["mount_point"],
|
||||
quota: $groupfolder["quota"],
|
||||
organizationProvider: $groupfolder["organization_provider"],
|
||||
organizationId: $groupfolder["organization_id"],
|
||||
);
|
||||
}
|
||||
|
||||
return $result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue