-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: make systemtags public visible
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
- Loading branch information
Showing
13 changed files
with
135 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
apps/systemtags/lib/Listeners/BeforeSabrePubliclyLoadedListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
namespace OCA\SystemTags\Listeners; | ||
|
||
use OCA\DAV\SystemTag\SystemTagPlugin; | ||
use OCP\BeforeSabrePubliclyLoadedEvent; | ||
use OCP\EventDispatcher\Event; | ||
use OCP\EventDispatcher\IEventListener; | ||
use OCP\Server; | ||
|
||
/** | ||
* @template-implements IEventListener<BeforeSabrePubliclyLoadedEvent> | ||
*/ | ||
class BeforeSabrePubliclyLoadedListener implements IEventListener { | ||
public function handle(Event $event): void { | ||
if (!$event instanceof BeforeSabrePubliclyLoadedEvent) { | ||
return; | ||
} | ||
$event->getServer()->addPlugin(Server::get(SystemTagPlugin::class)); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
apps/systemtags/lib/Listeners/BeforeTemplateRenderedListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
namespace OCA\SystemTags\Listeners; | ||
|
||
use OCA\Files_Sharing\Event\BeforeTemplateRenderedEvent; | ||
use OCA\SystemTags\AppInfo\Application; | ||
use OCP\EventDispatcher\Event; | ||
use OCP\EventDispatcher\IEventListener; | ||
use OCP\Util; | ||
|
||
/** | ||
* @template-implements IEventListener<BeforeTemplateRenderedEvent> | ||
*/ | ||
class BeforeTemplateRenderedListener implements IEventListener { | ||
public function handle(Event $event): void { | ||
if (!$event instanceof BeforeTemplateRenderedEvent) { | ||
return; | ||
} | ||
Util::addInitScript(Application::APP_ID, 'init'); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
apps/systemtags/lib/Listeners/LoadAdditionalScriptsListener.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
/** | ||
* SPDX-FileCopyrightText: 2024 Nextcloud GmbH and Nextcloud contributors | ||
* SPDX-License-Identifier: AGPL-3.0-or-later | ||
*/ | ||
namespace OCA\SystemTags\Listeners; | ||
|
||
use OCA\Files\Event\LoadAdditionalScriptsEvent; | ||
use OCA\Systemtags\AppInfo\Application; | ||
use OCP\EventDispatcher\Event; | ||
use OCP\EventDispatcher\IEventListener; | ||
use OCP\Util; | ||
|
||
/** | ||
* @template-implements IEventListener<LoadAdditionalScriptsEvent> | ||
*/ | ||
class LoadAdditionalScriptsListener implements IEventListener { | ||
public function handle(Event $event): void { | ||
if (!$event instanceof LoadAdditionalScriptsEvent) { | ||
return; | ||
} | ||
Util::addInitScript(Application::APP_ID, 'init'); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters