diff options
author | Frank Karlitschek <frank@owncloud.org> | 2012-05-06 23:00:36 +0200 |
---|---|---|
committer | Frank Karlitschek <frank@owncloud.org> | 2012-05-06 23:00:36 +0200 |
commit | 1945cd694636def02a2b2d4fb36720b3f0aeeb10 (patch) | |
tree | ee041bce0aaa57f99a6680c2138c8fef00129869 /lib/public/template.php | |
parent | 5d55c709dddad44984446efa49ceb7084fc16b3f (diff) | |
download | nextcloud-server-1945cd694636def02a2b2d4fb36720b3f0aeeb10.tar.gz nextcloud-server-1945cd694636def02a2b2d4fb36720b3f0aeeb10.zip |
ported the oc_template class
Diffstat (limited to 'lib/public/template.php')
-rw-r--r-- | lib/public/template.php | 48 |
1 files changed, 46 insertions, 2 deletions
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 { } + ?> |