diff options
author | Maxence Lange <maxence@nextcloud.com> | 2017-06-09 01:52:01 +0300 |
---|---|---|
committer | Maxence Lange <maxence@nextcloud.com> | 2017-06-09 01:52:01 +0300 |
commit | 9b9aa6bc7d4714bf5e2fc262d108cabd2a6fb8f2 (patch) | |
tree | 2ab4e63f93a618c51fc69dd06da227a10e0fa0f5 /lib/Api | |
parent | 5a21e7d46315ef1f621dabca332d15028304a0f2 (diff) |
generate[Remote]Link
Signed-off-by: Maxence Lange <maxence@nextcloud.com>
Diffstat (limited to 'lib/Api')
-rw-r--r-- | lib/Api/v1/Circles.php | 30 |
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 |