summaryrefslogtreecommitdiffstats
path: root/lib/private/Collaboration/Resources/Manager.php
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 /lib/private/Collaboration/Resources/Manager.php
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 'lib/private/Collaboration/Resources/Manager.php')
-rw-r--r--lib/private/Collaboration/Resources/Manager.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/private/Collaboration/Resources/Manager.php b/lib/private/Collaboration/Resources/Manager.php
index 82a14f47d9e..cc09089c711 100644
--- a/lib/private/Collaboration/Resources/Manager.php
+++ b/lib/private/Collaboration/Resources/Manager.php
@@ -120,6 +120,22 @@ class Manager implements IManager {
}
/**
+ *
+ * @param IResource $resource
+ * @return string
+ */
+ public function getIconClass(IResource $resource): string {
+ foreach ($this->getProviders() as $provider) {
+ try {
+ return $provider->getIconClass($resource);
+ } catch (ResourceException $e) {
+ }
+ }
+
+ return '';
+ }
+
+ /**
* Can a user/guest access the collection
*
* @param IResource $resource