mirror of
https://github.com/nextcloud/server.git
synced 2026-02-20 00:12:30 -05:00
Merge pull request #10911 from owncloud/template-funcs
Add template shortcut functions for style and script
This commit is contained in:
commit
0cdfe4f8c2
1 changed files with 18 additions and 0 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue