}
$apps = $this->getAppsForCategory('');
+ $supportedApps = $appClass->getSupportedApps();
foreach ($apps as $app) {
$app['appstore'] = true;
if (!array_key_exists($app['id'], $this->allApps)) {
} else {
$this->allApps[$app['id']] = array_merge($app, $this->allApps[$app['id']]);
}
+
+ if (in_array($app['id'], $supportedApps)) {
+ $this->allApps[$app['id']]['level'] = \OC_App::supportedApp;
+ }
}
// add bundle information
return $apps;
}
+ /**
+ * List all supported apps
+ *
+ * @return array
+ */
+ public function getSupportedApps(): array {
+ /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
+ $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class);
+ $supportedApps = $subscriptionRegistry->delegateGetSupportedApps();
+ return $supportedApps;
+ }
+
/**
* List all apps, this is used in apps.php
*
$appList = [];
$langCode = \OC::$server->getL10N('core')->getLanguageCode();
$urlGenerator = \OC::$server->getURLGenerator();
- /** @var \OCP\Support\Subscription\IRegistry $subscriptionRegistry */
- $subscriptionRegistry = \OC::$server->query(\OCP\Support\Subscription\IRegistry::class);
- $supportedApps = $subscriptionRegistry->delegateGetSupportedApps();
+ $supportedApps = $this->getSupportedApps();
foreach ($installedApps as $app) {
if (array_search($app, $blacklist) === false) {