appManager->getAppVersion($app); $appInfo = $this->appManager->getAppInfo($app) ?? []; $appName = $appInfo['name'] ?? $app; $changes = $this->manager->getChangelog($app, $version) ?? ''; // Remove version headline /** @var string[] */ $changes = explode("\n", $changes, 2); $changes = trim(end($changes)); $this->initialState->provideInitialState('changelog', [ 'appName' => $appName, 'appVersion' => $version, 'text' => $changes, ]); \OCP\Util::addScript($this->appName, 'view-changelog-page'); return new TemplateResponse($this->appName, 'empty'); } }