diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-06 14:25:28 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-09-06 14:25:28 +0200 |
commit | 7e4d24420096404e5902e66ff568d0a01f8a662e (patch) | |
tree | 7dbae6326ccc007093c92b24f196386c7752a400 /lib/private/template | |
parent | 6ca2ba6fde0314a7eebe059dfa9121d14caf4fa3 (diff) | |
download | nextcloud-server-7e4d24420096404e5902e66ff568d0a01f8a662e.tar.gz nextcloud-server-7e4d24420096404e5902e66ff568d0a01f8a662e.zip |
add shortcut functions for style and script
Diffstat (limited to 'lib/private/template')
-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 |