aboutsummaryrefslogtreecommitdiffstats
path: root/lib/public/Defaults.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/public/Defaults.php')
-rw-r--r--lib/public/Defaults.php45
1 files changed, 42 insertions, 3 deletions
diff --git a/lib/public/Defaults.php b/lib/public/Defaults.php
index ae873831b8b..591da18c7ee 100644
--- a/lib/public/Defaults.php
+++ b/lib/public/Defaults.php
@@ -42,7 +42,6 @@ class Defaults {
/**
* \OC_Defaults instance to retrieve the defaults
- * @return string
* @since 6.0.0
*/
private $defaults;
@@ -52,8 +51,11 @@ class Defaults {
* actual defaults
* @since 6.0.0
*/
- function __construct() {
- $this->defaults = \OC::$server->getThemingDefaults();
+ function __construct(\OC_Defaults $defaults = null) {
+ if ($defaults === null) {
+ $defaults = \OC::$server->getThemingDefaults();
+ }
+ $this->defaults = $defaults;
}
/**
@@ -172,4 +174,41 @@ class Defaults {
public function getiTunesAppId() {
return $this->defaults->getiTunesAppId();
}
+
+ /**
+ * Themed logo url
+ *
+ * @return string
+ * @since 12.0.0
+ */
+ public function getLogo() {
+ return $this->defaults->getLogo();
+ }
+
+ /**
+ * Returns primary color
+ * @return string
+ * @since 12.0.0
+ */
+ public function getColorPrimary() {
+ return $this->defaults->getColorPrimary();
+ }
+
+ /**
+ * @param string $key
+ * @return string URL to doc with key
+ * @since 12.0.0
+ */
+ public function buildDocLinkToKey($key) {
+ return $this->defaults->buildDocLinkToKey($key);
+ }
+
+ /**
+ * Returns the title
+ * @return string title
+ * @since 12.0.0
+ */
+ public function getTitle() {
+ return $this->defaults->getTitle();
+ }
}