mirror of
https://github.com/nextcloud/app_api.git
synced 2025-07-29 21:02:07 +00:00
Declarative Settings API (#149)
Signed-off-by: Andrey Borysenko <andrey18106x@gmail.com> Signed-off-by: Alexander Piskun <bigcat88@icloud.com> Co-authored-by: Alexander Piskun <13381981+bigcat88@users.noreply.github.com> Co-authored-by: Alexander Piskun <bigcat88@icloud.com>
This commit is contained in:
@ -6,6 +6,9 @@ namespace OCA\AppAPI\AppInfo;
|
||||
|
||||
use OCA\AppAPI\Capabilities;
|
||||
use OCA\AppAPI\DavPlugin;
|
||||
use OCA\AppAPI\Listener\DeclarativeSettings\GetValueListener;
|
||||
use OCA\AppAPI\Listener\DeclarativeSettings\RegisterDeclarativeSettingsListener;
|
||||
use OCA\AppAPI\Listener\DeclarativeSettings\SetValueListener;
|
||||
use OCA\AppAPI\Listener\LoadFilesPluginListener;
|
||||
use OCA\AppAPI\Listener\SabrePluginAuthInitListener;
|
||||
use OCA\AppAPI\Listener\UserDeletedListener;
|
||||
@ -34,6 +37,9 @@ use OCP\IUser;
|
||||
use OCP\IUserSession;
|
||||
use OCP\Profiler\IProfiler;
|
||||
use OCP\SabrePluginEvent;
|
||||
use OCP\Settings\GetDeclarativeSettingsValueEvent;
|
||||
use OCP\Settings\RegisterDeclarativeSettingsFormEvent;
|
||||
use OCP\Settings\SetDeclarativeSettingsValueEvent;
|
||||
use OCP\User\Events\UserDeletedEvent;
|
||||
use Psr\Container\ContainerExceptionInterface;
|
||||
use Psr\Container\NotFoundExceptionInterface;
|
||||
@ -62,7 +68,10 @@ class Application extends App implements IBootstrap {
|
||||
$context->registerNotifierService(ExAppNotifier::class);
|
||||
$context->registerNotifierService(ExAppAdminNotifier::class);
|
||||
|
||||
// Dynamic anonymous providers registration
|
||||
$context->registerEventListener(RegisterDeclarativeSettingsFormEvent::class, RegisterDeclarativeSettingsListener::class);
|
||||
$context->registerEventListener(GetDeclarativeSettingsValueEvent::class, GetValueListener::class);
|
||||
$context->registerEventListener(SetDeclarativeSettingsValueEvent::class, SetValueListener::class);
|
||||
|
||||
$container = $this->getContainer();
|
||||
try {
|
||||
/** @var SpeechToTextService $speechToTextService */
|
||||
|
Reference in New Issue
Block a user