summaryrefslogtreecommitdiffstats
path: root/core/Controller
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-01-23 17:48:24 +0100
committerJulius Härtl <jus@bitgrid.net>2019-03-01 20:56:17 +0100
commit88aa3de7842a5113de5f137ba57bdae1f77777b5 (patch)
tree41be56cdfaa58851e271e59433a895240555ed26 /core/Controller
parent555afff015ec2fa785726bf0d9169d25d53ba679 (diff)
downloadnextcloud-server-88aa3de7842a5113de5f137ba57bdae1f77777b5.tar.gz
nextcloud-server-88aa3de7842a5113de5f137ba57bdae1f77777b5.zip
Add iconClass to resources
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'core/Controller')
-rw-r--r--core/Controller/CollaborationResourcesController.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/core/Controller/CollaborationResourcesController.php b/core/Controller/CollaborationResourcesController.php
index a5a40145fb7..565e0ba4739 100644
--- a/core/Controller/CollaborationResourcesController.php
+++ b/core/Controller/CollaborationResourcesController.php
@@ -197,15 +197,16 @@ class CollaborationResourcesController extends OCSController {
];
}
- protected function prepareResources(IResource $resource): array {
+ protected function prepareResources(IResource $resource): ?array {
if (!$resource->canAccess($this->userSession->getUser())) {
- return [];
+ return null;
}
return [
'type' => $resource->getType(),
'id' => $resource->getId(),
'name' => $resource->getName(),
+ 'iconClass' => $resource->getIconClass()
];
}
}