aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Collaboration
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2019-03-14 12:30:34 +0100
committerJulius Härtl <jus@bitgrid.net>2019-03-19 13:06:55 +0100
commit3022ef687a7bef87fc8eff7e29a68d8cf64542e9 (patch)
treebeba5dd9a6d407107a4f2d3b8b2fe07f503f55cf /lib/public/Collaboration
parent403b673b93b98b7158838c232581ad221aeccd09 (diff)
downloadnextcloud-server-3022ef687a7bef87fc8eff7e29a68d8cf64542e9.tar.gz
nextcloud-server-3022ef687a7bef87fc8eff7e29a68d8cf64542e9.zip
Use rich objects instead of name, link and icon
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/public/Collaboration')
-rw-r--r--lib/public/Collaboration/Resources/IProvider.php24
-rw-r--r--lib/public/Collaboration/Resources/IResource.php17
2 files changed, 5 insertions, 36 deletions
diff --git a/lib/public/Collaboration/Resources/IProvider.php b/lib/public/Collaboration/Resources/IProvider.php
index 16ab16c0d1b..c091ecaa8d5 100644
--- a/lib/public/Collaboration/Resources/IProvider.php
+++ b/lib/public/Collaboration/Resources/IProvider.php
@@ -38,31 +38,13 @@ interface IProvider {
public function getType(): string;
/**
- * Get the display name of a resource
+ * Get the rich object data of a resource
*
* @param IResource $resource
- * @return string
- * @since 16.0.0
- */
- public function getName(IResource $resource): string;
-
- /**
- * Get the icon class of a resource
- *
- * @param IResource $resource
- * @return string
- * @since 16.0.0
- */
- public function getIconLink(IResource $resource): string;
-
- /**
- * Get the link to a resource
- *
- * @param IResource $resource
- * @return string
+ * @return array
* @since 16.0.0
*/
- public function getLink(IResource $resource): string;
+ public function getResourceRichObject(IResource $resource): array;
/**
* Can a user/guest access the collection
diff --git a/lib/public/Collaboration/Resources/IResource.php b/lib/public/Collaboration/Resources/IResource.php
index 0a3e36a33ce..32567a3be0a 100644
--- a/lib/public/Collaboration/Resources/IResource.php
+++ b/lib/public/Collaboration/Resources/IResource.php
@@ -42,23 +42,10 @@ interface IResource {
public function getId(): string;
/**
- * @return string
- * @since 16.0.0
- */
- public function getName(): string;
-
- /**
- * Absolute link to an icon to represent the resource
- * @return string
- * @since 16.0.0
- */
- public function getIconLink(): string;
-
- /**
- * @return string
+ * @return array
* @since 16.0.0
*/
- public function getLink(): string;
+ public function getRichObject(): array;
/**
* Can a user/guest access the resource