diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2025-03-03 11:38:39 +0100 |
---|---|---|
committer | Côme Chilliet <91878298+come-nc@users.noreply.github.com> | 2025-03-06 15:49:25 +0100 |
commit | f033ef7c18f87284c15a55321ec727b41836132c (patch) | |
tree | 7fc19609d8b52736440cfc83c8a03fbf09b4ddda /lib/public/AppFramework/Http | |
parent | 7d64c63acf9cf5ef18dd36ccb1883a3540bf86c7 (diff) | |
download | nextcloud-server-f033ef7c18f87284c15a55321ec727b41836132c.tar.gz nextcloud-server-f033ef7c18f87284c15a55321ec727b41836132c.zip |
fix: Migrate all uses of OCP\Template to OCP\Template\ITemplateManager
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/public/AppFramework/Http')
-rw-r--r-- | lib/public/AppFramework/Http/TemplateResponse.php | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/public/AppFramework/Http/TemplateResponse.php b/lib/public/AppFramework/Http/TemplateResponse.php index 55b9f2b06af..af37a1a2313 100644 --- a/lib/public/AppFramework/Http/TemplateResponse.php +++ b/lib/public/AppFramework/Http/TemplateResponse.php @@ -1,13 +1,19 @@ <?php +declare(strict_types=1); + + /** * SPDX-FileCopyrightText: 2016-2024 Nextcloud GmbH and Nextcloud contributors * SPDX-FileCopyrightText: 2016 ownCloud, Inc. * SPDX-License-Identifier: AGPL-3.0-only */ + namespace OCP\AppFramework\Http; use OCP\AppFramework\Http; +use OCP\Server; +use OCP\Template\ITemplateManager; /** * Response for a normal template @@ -180,7 +186,7 @@ class TemplateResponse extends Response { $renderAs = $this->renderAs; } - $template = new \OCP\Template($this->appName, $this->templateName, $renderAs); + $template = Server::get(ITemplateManager::class)->getTemplate($this->appName, $this->templateName, $renderAs); foreach ($this->params as $key => $value) { $template->assign($key, $value); |