diff options
author | Bart Visscher <bartv@thisnet.nl> | 2012-09-12 18:00:33 +0200 |
---|---|---|
committer | Bart Visscher <bartv@thisnet.nl> | 2012-09-12 18:00:33 +0200 |
commit | 3efe1d3b24e65ed76d521c24b0cfe4e0ff2e7af5 (patch) | |
tree | 6fd36eeeb824d069f9ea9ead530f4f03f8f3e2c7 /lib/helper.php | |
parent | ceec5e593c677ed9e9339739d0a66a28e4f25d12 (diff) | |
download | nextcloud-server-3efe1d3b24e65ed76d521c24b0cfe4e0ff2e7af5.tar.gz nextcloud-server-3efe1d3b24e65ed76d521c24b0cfe4e0ff2e7af5.zip |
Add linkToRoute functionality
Diffstat (limited to 'lib/helper.php')
-rw-r--r-- | lib/helper.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/lib/helper.php b/lib/helper.php index ed4bf53250a..269327b531d 100644 --- a/lib/helper.php +++ b/lib/helper.php @@ -29,6 +29,20 @@ class OC_Helper { private static $tmpFiles=array(); /** + * @brief Creates an url using a defined route + * @param $route + * @param $parameters + * @param $args array with param=>value, will be appended to the returned url + * @returns the url + * + * Returns a url to the given app and file. + */ + public static function linkToRoute( $route, $parameters = array() ) { + $urlLinkTo = OC::getRouter()->generate($route, $parameters); + return $urlLinkTo; + } + + /** * @brief Creates an url * @param $app app * @param $file file |