diff options
author | Joas Schilling <coding@schilljs.com> | 2017-06-12 09:57:34 +0200 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2017-06-13 11:17:44 +0200 |
commit | fcdcd3f2832bffcc9f2a28cf485f9859ce2e5227 (patch) | |
tree | 77d5c18d9bf3d494d1eab3dd58f2c12afb98dfb7 /apps/files/lib | |
parent | b0171a758452176317e30e5431ac2833d06bffc3 (diff) | |
download | nextcloud-server-fcdcd3f2832bffcc9f2a28cf485f9859ce2e5227.tar.gz nextcloud-server-fcdcd3f2832bffcc9f2a28cf485f9859ce2e5227.zip |
Add an event so apps can add hidden fields to the files page
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'apps/files/lib')
-rw-r--r-- | apps/files/lib/Controller/ViewController.php | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php index fc59622af89..bfeb2cafcf6 100644 --- a/apps/files/lib/Controller/ViewController.php +++ b/apps/files/lib/Controller/ViewController.php @@ -41,6 +41,7 @@ use OCP\IUserSession; use Symfony\Component\EventDispatcher\EventDispatcherInterface; use OCP\Files\Folder; use OCP\App\IAppManager; +use Symfony\Component\EventDispatcher\GenericEvent; /** * Class ViewController @@ -199,7 +200,8 @@ class ViewController extends Controller { $contentItems[] = $contentItem; } - $this->eventDispatcher->dispatch('OCA\Files::loadAdditionalScripts'); + $event = new GenericEvent(null, ['hiddenFields' => []]); + $this->eventDispatcher->dispatch('OCA\Files::loadAdditionalScripts', $event); $params = []; $params['usedSpacePercent'] = (int)$storageInfo['relative']; @@ -215,6 +217,7 @@ class ViewController extends Controller { $params['fileNotFound'] = $fileNotFound ? 1 : 0; $params['appNavigation'] = $nav; $params['appContents'] = $contentItems; + $params['hiddenFields'] = $event->getArgument('hiddenFields'); $response = new TemplateResponse( $this->appName, |