summaryrefslogtreecommitdiffstats
path: root/lib/private/DirectEditing
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2019-11-25 13:56:22 +0100
committerJulius Härtl <jus@bitgrid.net>2019-11-27 14:36:21 +0100
commitbc36cc808fb9ed9ff22c42246fe68f06cedb902e (patch)
treedbdc538fae802d97bf04b93c02fde177c466b86b /lib/private/DirectEditing
parentc8d3e32190d8672c9fc42cd30a63182623006431 (diff)
downloadnextcloud-server-bc36cc808fb9ed9ff22c42246fe68f06cedb902e.tar.gz
nextcloud-server-bc36cc808fb9ed9ff22c42246fe68f06cedb902e.zip
Move editor list to capabilities
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/DirectEditing')
-rw-r--r--lib/private/DirectEditing/Manager.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/private/DirectEditing/Manager.php b/lib/private/DirectEditing/Manager.php
index 353faedf7eb..fdf0a1f0f0f 100644
--- a/lib/private/DirectEditing/Manager.php
+++ b/lib/private/DirectEditing/Manager.php
@@ -32,6 +32,8 @@ use OCP\DirectEditing\ACreateFromTemplate;
use OCP\DirectEditing\IEditor;
use \OCP\DirectEditing\IManager;
use OCP\DirectEditing\IToken;
+use OCP\DirectEditing\RegisterDirectEditorEvent;
+use OCP\EventDispatcher\IEventDispatcher;
use OCP\Files\File;
use OCP\Files\IRootFolder;
use OCP\Files\NotFoundException;
@@ -47,7 +49,7 @@ class Manager implements IManager {
public const TABLE_TOKENS = 'direct_edit';
/** @var IEditor[] */
- private $editors;
+ private $editors = [];
/** @var IDBConnection */
private $connection;
@@ -62,12 +64,15 @@ class Manager implements IManager {
ISecureRandom $random,
IDBConnection $connection,
IUserSession $userSession,
- IRootFolder $rootFolder
+ IRootFolder $rootFolder,
+ IEventDispatcher $eventDispatcher
) {
$this->random = $random;
$this->connection = $connection;
$this->userId = $userSession->getUser() ? $userSession->getUser()->getUID() : null;
$this->rootFolder = $rootFolder;
+ $eventDispatcher->dispatch(RegisterDirectEditorEvent::class, new RegisterDirectEditorEvent($this));
+
}
public function registerDirectEditor(IEditor $directEditor): void {