diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2017-04-11 14:39:46 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-11 14:39:46 +0200 |
commit | afb5d45705f7d7743b9dfd2d79b618938cb05b77 (patch) | |
tree | a0828097cae435e504350d6aae0bbca56f40435c /lib/public | |
parent | 5ca5ebe584999d6dbc4b363bb285c8ae00c1b5f2 (diff) | |
parent | d83c8e02718f5ae555e75d8582904611a4d6766a (diff) | |
download | nextcloud-server-afb5d45705f7d7743b9dfd2d79b618938cb05b77.tar.gz nextcloud-server-afb5d45705f7d7743b9dfd2d79b618938cb05b77.zip |
Merge pull request #4256 from nextcloud/theming
Move OC_Defaults to OCP\Defaults
Diffstat (limited to 'lib/public')
-rw-r--r-- | lib/public/Defaults.php | 45 |
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(); + } } |