Add dedicated product name to OCP\Defaults

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2021-03-05 10:03:26 +01:00
parent 51add75e51
commit 4673b54a2c
No known key found for this signature in database
GPG Key ID: 4C614C6ED2CDE6DF
2 changed files with 18 additions and 1 deletions

View File

@ -75,6 +75,8 @@ class ThemingDefaults extends \OC_Defaults {
/** @var string */
private $entity;
/** @var string */
private $productName;
/** @var string */
private $url;
/** @var string */
private $color;
@ -119,6 +121,7 @@ class ThemingDefaults extends \OC_Defaults {
$this->name = parent::getName();
$this->title = parent::getTitle();
$this->entity = parent::getEntity();
$this->productName = parent::getName();
$this->url = parent::getBaseUrl();
$this->color = parent::getColorPrimary();
$this->iTunesAppId = parent::getiTunesAppId();
@ -142,6 +145,10 @@ class ThemingDefaults extends \OC_Defaults {
return strip_tags($this->config->getAppValue('theming', 'name', $this->entity));
}
public function getProductName() {
return strip_tags($this->config->getAppValue('theming', 'productName', $this->productName));
}
public function getBaseUrl() {
return $this->config->getAppValue('theming', 'url', $this->url);
}

View File

@ -104,7 +104,7 @@ class Defaults {
}
/**
* name of your ownCloud instance
* name of your Nextcloud instance (e.g. MyPrivateCloud)
* @return string
* @since 6.0.0
*/
@ -112,6 +112,16 @@ class Defaults {
return $this->defaults->getName();
}
/**
* Name of the software product (defaults to Nextcloud)
*
* @return string
* @since 22.0.0
*/
public function getProductName(): string {
return $this->defaults->getProductName();
}
/**
* name of your ownCloud instance containing HTML styles
* @return string