Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/circles.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib/Api
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Api')
-rw-r--r--lib/Api/v1/Circles.php30
1 files changed, 30 insertions, 0 deletions
diff --git a/lib/Api/v1/Circles.php b/lib/Api/v1/Circles.php
index 1081f7a4..06c63e68 100644
--- a/lib/Api/v1/Circles.php
+++ b/lib/Api/v1/Circles.php
@@ -304,4 +304,34 @@ class Circles {
->linkCircle($circleId, $remote);
}
+
+ /**
+ * Circles::generateLink();
+ *
+ * Returns the link to get access to a local circle.
+ *
+ * @param int $circleId
+ *
+ * @return string
+ */
+ public static function generateLink($circleId) {
+ return \OC::$server->getURLGenerator()
+ ->linkToRoute('circles.Navigation.navigate') . '#' . $circleId;
+ }
+
+
+ /**
+ * Circles::generateLink();
+ *
+ * Returns the link to get access to a remote circle.
+ *
+ * @param int $circleId
+ *
+ * @return string
+ */
+ public static function generateRemoteLink($remote, $circleId) {
+ return \OC::$server->getURLGenerator()
+ ->linkToRoute('circles.Navigation.navigate') . '#' . $circleId;
+ }
+
} \ No newline at end of file