From 67408c3f63b94431f767248a69569bb320de0968 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 6 Sep 2016 08:55:22 +0200 Subject: Add image URLs and tests --- apps/theming/lib/Capabilities.php | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'apps/theming/lib/Capabilities.php') diff --git a/apps/theming/lib/Capabilities.php b/apps/theming/lib/Capabilities.php index 45a48e3c2ca..b483cc80aed 100644 --- a/apps/theming/lib/Capabilities.php +++ b/apps/theming/lib/Capabilities.php @@ -24,6 +24,7 @@ namespace OCA\Theming; use OCP\Capabilities\ICapability; +use OCP\IURLGenerator; /** * Class Capabilities @@ -35,11 +36,17 @@ class Capabilities implements ICapability { /** @var ThemingDefaults */ protected $theming; + + /** @var IURLGenerator */ + protected $url; + /** * @param ThemingDefaults $theming + * @param IURLGenerator $url */ - public function __construct(ThemingDefaults $theming) { + public function __construct(ThemingDefaults $theming, IURLGenerator $url) { $this->theming = $theming; + $this->url = $url; } /** @@ -54,6 +61,8 @@ class Capabilities implements ICapability { 'url' => $this->theming->getBaseUrl(), 'slogan' => $this->theming->getSlogan(), 'color' => $this->theming->getMailHeaderColor(), + 'logo' => $this->url->getAbsoluteURL($this->theming->getLogo()), + 'background' => $this->url->getAbsoluteURL($this->theming->getBackground()), ], ]; } -- cgit v1.2.3