getAppContainer(); /** @var IAppManager $appManager */ $appManager = $appContainer->get(IAppManager::class); /** @var IInitialState $initialState */ $initialState = $appContainer->get(IInitialState::class); if (null === $appManager->getAppInfo(self::GPODDERSYNC_ID)) { $appManager->disableApp(self::GPODDERSYNC_ID); } $gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID); if (!$gpoddersync) { try { $appManager->enableApp(self::GPODDERSYNC_ID); } catch (AppPathNotFoundException) { } } $gpoddersync = $appManager->isEnabledForUser(self::GPODDERSYNC_ID); $initialState->provideInitialState('gpodder', $gpoddersync); } public function register(IRegistrationContext $context): void { $context->registerSearchProvider(SearchProvider::class); } }