Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBernhard Posselt <dev@bernhard-posselt.com>2014-09-06 16:25:28 +0400
committerBernhard Posselt <dev@bernhard-posselt.com>2014-09-09 21:40:02 +0400
commitca121d8438ea0eba6ecf3e3c47c4616d834e787c (patch)
tree204a074bd8758d9d8b49dc4a821cc60451af1fa7 /lib/private/template
parentf5bac5fb2d74c70d2c12f351b9266d35170004ab (diff)
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 46e48274001..e4af4aa4e1a 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