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:
authorMaxence Lange <maxence@nextcloud.com>2017-06-09 01:52:01 +0300
committerMaxence Lange <maxence@nextcloud.com>2017-06-09 01:52:01 +0300
commit9b9aa6bc7d4714bf5e2fc262d108cabd2a6fb8f2 (patch)
tree2ab4e63f93a618c51fc69dd06da227a10e0fa0f5 /lib/Api
parent5a21e7d46315ef1f621dabca332d15028304a0f2 (diff)
generate[Remote]Link
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
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