diff options
author | Lukas Reschke <lukas@owncloud.com> | 2014-09-08 16:32:05 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@owncloud.com> | 2014-09-08 16:32:05 +0200 |
commit | 0cdfe4f8c29a9b1b044fdc5fbdcf1d052935deb4 (patch) | |
tree | 976069b4e0d4563992ece8ec94ff60ac61bcc367 | |
parent | b8266a07b7dfa83ae1b5841e7a3cf5b61fa0a4ac (diff) | |
parent | 7e4d24420096404e5902e66ff568d0a01f8a662e (diff) | |
download | nextcloud-server-0cdfe4f8c29a9b1b044fdc5fbdcf1d052935deb4.tar.gz nextcloud-server-0cdfe4f8c29a9b1b044fdc5fbdcf1d052935deb4.zip |
Merge pull request #10911 from owncloud/template-funcs
Add template shortcut functions for style and script
-rw-r--r-- | lib/private/template/functions.php | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/lib/private/template/functions.php b/lib/private/template/functions.php index 3cbf0d9748f..09db011e748 100644 --- a/lib/private/template/functions.php +++ b/lib/private/template/functions.php @@ -24,6 +24,24 @@ function print_unescaped($string) { } /** + * Shortcut for adding scripts to a page + * @param string $app the appname + * @param string $file the filename + */ +function script($app, $file) { + OC_Util::addScript($app, $file); +} + +/** + * Shortcut for adding styles to a page + * @param string $app the appname + * @param string $file the filename + */ +function style($app, $file) { + OC_Util::addStyle($app, $file); +} + +/** * make OC_Helper::linkTo available as a simple function * @param string $app app * @param string $file file |