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
parent ac04ba6784
commit 18fd8ff70c
No known key found for this signature in database
GPG Key ID: 2378A753E2BF04F6
4 changed files with 16 additions and 20 deletions

View File

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

View File

@ -1,11 +1,6 @@
<?php <?php
/** /**
* @copyright Copyright (c) 2016 Bjoern Schiessle <bjoern@schiessle.org> * @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 * @license GNU AGPL version 3 or any later version
* *
@ -24,20 +19,19 @@
* *
*/ */
namespace OCA\Theming; namespace OCA\Theming;
use OCP\IConfig; use OCP\IConfig;
use OCP\IL10N; use OCP\IL10N;
use OCP\IURLGenerator; use OCP\IURLGenerator;
/**
* Class Template class ThemingDefaults extends \OC_Defaults {
*
* Handle all the values which can be modified by this app
*
* @package OCA\Theming
*/
class Template extends \OC_Defaults {
/** @var IConfig */ /** @var IConfig */
private $config; private $config;
/** @var IL10N */ /** @var IL10N */
@ -168,4 +162,5 @@ class Template extends \OC_Defaults {
return $returnValue; return $returnValue;
} }
} }

View File

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

View File

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