summaryrefslogtreecommitdiffstats
path: root/lib/private/template
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-06 14:25:28 +0200
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-06 14:25:28 +0200
commit7e4d24420096404e5902e66ff568d0a01f8a662e (patch)
tree7dbae6326ccc007093c92b24f196386c7752a400 /lib/private/template
parent6ca2ba6fde0314a7eebe059dfa9121d14caf4fa3 (diff)
downloadnextcloud-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.php18
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