]> source.dussan.org Git - nextcloud-server.git/commitdiff
add shortcut functions for style and script
authorBernhard Posselt <dev@bernhard-posselt.com>
Sat, 6 Sep 2014 12:25:28 +0000 (14:25 +0200)
committerBernhard Posselt <dev@bernhard-posselt.com>
Sat, 6 Sep 2014 12:25:28 +0000 (14:25 +0200)
lib/private/template/functions.php

index 3cbf0d9748f8f009585b88f8d545af0cb85306fc..09db011e748eefeb0f931ce8a5fe6534ada6be01 100644 (file)
@@ -23,6 +23,24 @@ function print_unescaped($string) {
        print($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