From 1945cd694636def02a2b2d4fb36720b3f0aeeb10 Mon Sep 17 00:00:00 2001 From: Frank Karlitschek Date: Sun, 6 May 2012 23:00:36 +0200 Subject: ported the oc_template class --- lib/public/template.php | 48 ++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 46 insertions(+), 2 deletions(-) (limited to 'lib/public/template.php') diff --git a/lib/public/template.php b/lib/public/template.php index eefd2a029fc..d8f70c77fb2 100644 --- a/lib/public/template.php +++ b/lib/public/template.php @@ -40,17 +40,61 @@ namespace OCP; * For further information have a look at OC_Helper::imagePath */ function image_path( $app, $image ){ - return(image_path( $app, $image )); + return(\image_path( $app, $image )); } +/** + * @brief make OC_Helper::mimetypeIcon available as a simple function + * @param $mimetype mimetype + * @returns link to the image + * + * For further information have a look at OC_Helper::mimetypeIcon + */ +function mimetype_icon( $mimetype ){ + return(\mimetype_icon( $mimetype )); +} + + +/** + * @brief make OC_Helper::humanFileSize available as a simple function + * @param $bytes size in bytes + * @returns size as string + * + * For further information have a look at OC_Helper::humanFileSize + */ +function human_file_size( $bytes ){ + return(\human_file_size( $bytes )); +} + -class Template extends OC_Template { +/** + * TODO + */ +function relative_modified_date($timestamp) { + return(\relative_modified_date($timestamp)); +} + + +/** + * TODO + */ +function simple_file_size($bytes) { + return(\simple_file_size($bytes)); +} +/** + * TODO + */ +function html_select_options($options, $selected, $params=array()) { + return(\html_select_options($options, $selected, $params=array())); +} +class Template extends \OC_Template { } + ?> -- cgit v1.2.3