summaryrefslogtreecommitdiffstats
path: root/lib/public
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2019-01-29 21:23:59 +0100
committerRoeland Jago Douma <roeland@famdouma.nl>2019-01-31 12:11:40 +0100
commitd182037bce570243a67d61f756fdf75bb4df17ff (patch)
treec8d4709c1b288e97fa401f66e85656b304f6ef5d /lib/public
parent87c8a71647b744e2fb83349bd8f98042a32b0d9e (diff)
downloadnextcloud-server-d182037bce570243a67d61f756fdf75bb4df17ff.tar.gz
nextcloud-server-d182037bce570243a67d61f756fdf75bb4df17ff.zip
Emit to load additionalscripts
Fixes #13662 This will fire of an event after a Template Response has been returned. There is an event for the generic loading and one when logged in. So apps can chose to load only on loged in pages. This is a more generic approach than the files app event. As some things we might want to load on other pages as well besides the files app. Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/public')
-rw-r--r--lib/public/AppFramework/Http/TemplateResponse.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php
index 0e31f780d7a..f6436038cc3 100644
--- a/lib/public/AppFramework/Http/TemplateResponse.php
+++ b/lib/public/AppFramework/Http/TemplateResponse.php
@@ -37,6 +37,9 @@ namespace OCP\AppFramework\Http;
*/
class TemplateResponse extends Response {
+ const EVENT_LOAD_ADDITIONAL_SCRIPTS = self::class . '::loadAdditionalScripts';
+ const EVENT_LOAD_ADDITIONAL_SCRIPTS_LOGGEDIN = self::class . '::loadAdditionalScriptsLoggedIn';
+
/**
* name of the template
* @var string