Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2016-09-06 09:55:22 +0300
committerJoas Schilling <coding@schilljs.com>2016-09-06 09:55:22 +0300
commit67408c3f63b94431f767248a69569bb320de0968 (patch)
tree50bdba4e94023aba36c07ed3538a29bb3cfc5236 /apps/theming/lib/Capabilities.php
parent1d834bd49e2ba215b0de58fc8845f467ddfe51e4 (diff)
Add image URLs and tests
Diffstat (limited to 'apps/theming/lib/Capabilities.php')
-rw-r--r--apps/theming/lib/Capabilities.php11
1 files changed, 10 insertions, 1 deletions
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()),
],
];
}