rename "Tenmplate" to "ThemingDefaults" to make the auto loader happy"

This commit is contained in:
Bjoern Schiessle 2016-08-12 15:30:35 +02:00 committed by Lukas Reschke
parent a5ba5bb19f
commit 4132319bae
No known key found for this signature in database
GPG Key ID: B9F6980CF6E759B1
4 changed files with 16 additions and 20 deletions

View File

@ -23,7 +23,7 @@
namespace OCA\Theming\Settings;
use OCA\Theming\Template;
use OCA\Theming\ThemingDefaults;
use OCP\AppFramework\Http\TemplateResponse;
use OCP\IConfig;
use OCP\IL10N;
@ -44,7 +44,7 @@ class Admin implements ISettings {
/** @var IURLGenerator */
private $urlGenerator;
public function __construct(IConfig $config, IL10N $l, Template $themingDefaults, IURLGenerator $urlGenerator) {
public function __construct(IConfig $config, IL10N $l, ThemingDefaults $themingDefaults, IURLGenerator $urlGenerator) {
$this->config = $config;
$this->l = $l;
$this->themingDefaults = $themingDefaults;

View File

@ -1,11 +1,6 @@
<?php
/**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org>
* @copyright Copyright (c) 2016 Lukas Reschke <lukas@statuscode.ch>
*
* @author Bjoern Schiessle <bjoern@schiessle.org>
* @author Joas Schilling <coding@schilljs.com>
* @author Lukas Reschke <lukas@statuscode.ch>
*
* @license GNU AGPL version 3 or any later version
*
@ -24,20 +19,19 @@
*
*/
namespace OCA\Theming;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
/**
* Class Template
*
* Handle all the values which can be modified by this app
*
* @package OCA\Theming
*/
class Template extends \OC_Defaults {
class ThemingDefaults extends \OC_Defaults {
/** @var IConfig */
private $config;
/** @var IL10N */
@ -92,7 +86,7 @@ class Template extends \OC_Defaults {
public function getEntity() {
return $this->config->getAppValue('theming', 'name', $this->name);
}
public function getBaseUrl() {
return $this->config->getAppValue('theming', 'url', $this->url);
}
@ -168,4 +162,5 @@ class Template extends \OC_Defaults {
return $returnValue;
}
}

View File

@ -24,12 +24,13 @@
namespace OCA\Theming\Tests;
use OCA\Theming\Template;
use OCA\Theming\ThemingDefaults;
use OCP\IConfig;
use OCP\IL10N;
use OCP\IURLGenerator;
use Test\TestCase;
class TemplateTest extends TestCase {
class ThemingDefaultsTest extends TestCase {
/** @var IConfig */
private $config;
/** @var IL10N */
@ -64,7 +65,7 @@ class TemplateTest extends TestCase {
->expects($this->at(3))
->method('getMailHeaderColor')
->willReturn('#000');
$this->template = new Template(
$this->template = new ThemingDefaults(
$this->config,
$this->l10n,
$this->urlGenerator,

View File

@ -82,7 +82,7 @@ use OC\Security\SecureRandom;
use OC\Security\TrustedDomainHelper;
use OC\Session\CryptoWrapper;
use OC\Tagging\TagMapper;
use OCA\Theming\Template;
use OCA\Theming\ThemingDefaults;
use OCP\IL10N;
use OCP\IServerContainer;
use OCP\Security\IContentSecurityPolicyManager;
@ -650,7 +650,7 @@ class Server extends ServerContainer implements IServerContainer {
}
if ($classExists && $this->getConfig()->getSystemValue('installed', false) && $this->getAppManager()->isInstalled('theming')) {
return new Template(
return new ThemingDefaults(
$this->getConfig(),
$this->getL10N('theming'),
$this->getURLGenerator(),