* @brief Creates an url
* @param $app app
* @param $file file
+ * @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 linkTo( $app, $file ){
+ public static function linkTo( $app, $file, $args = array() ){
if( $app != '' ){
$app_path = OC_App::getAppPath($app);
// Check if the app is in the app folder
}
}
+ foreach($args as $k => $v) {
+ $urlLinkTo .= '&'.$k.'='.$v;
+ }
+
return $urlLinkTo;
}
* @brief Creates an absolute url
* @param $app app
* @param $file file
+ * @param $args array with param=>value, will be appended to the returned url
* @returns the url
*
* Returns a absolute url to the given app and file.
*/
- public static function linkToAbsolute( $app, $file ) {
- $urlLinkTo = self::linkTo( $app, $file );
+ public static function linkToAbsolute( $app, $file, $args = array() ) {
+ $urlLinkTo = self::linkTo( $app, $file, $args );
return self::makeURLAbsolute($urlLinkTo);
}
* @brief Creates an absolute url
* @param $app app
* @param $file file
+ * @param $args array with param=>value, will be appended to the returned url
* @returns the url
*
* Returns a absolute url to the given app and file.
*/
- public static function linkToAbsolute( $app, $file ) {
- return(\OC_Helper::linkToAbsolute( $app, $file ));
+ public static function linkToAbsolute( $app, $file, $args = array() ) {
+ return(\OC_Helper::linkToAbsolute( $app, $file, $args ));
}
* @brief Creates an url
* @param $app app
* @param $file file
+ * @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 linkTo( $app, $file ){
- return(\OC_Helper::linkTo( $app, $file ));
+ public static function linkTo( $app, $file, $args = array() ){
+ return(\OC_Helper::linkTo( $app, $file, $args ));
}
/**
* @brief make OC_Helper::linkTo available as a simple function
* @param $app app
* @param $file file
+ * @param $args array with param=>value, will be appended to the returned url
* @returns link to the file
*
* For further information have a look at OC_Helper::linkTo
*/
-function link_to( $app, $file ){
- return OC_Helper::linkTo( $app, $file );
+function link_to( $app, $file, $args = array() ){
+ return OC_Helper::linkTo( $app, $file, $args );
}
/**