mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
Refactor OC\Server::getThemingDefaults
Signed-off-by: Andrew Summers <18727110+summersab@users.noreply.github.com>
This commit is contained in:
parent
9d1547f59d
commit
ce74bdcda2
5 changed files with 6 additions and 6 deletions
|
|
@ -173,7 +173,7 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
});
|
||||
|
||||
$this->registerService('OC_Defaults', function (ContainerInterface $c) {
|
||||
return $c->get(IServerContainer::class)->getThemingDefaults();
|
||||
return $c->get(IServerContainer::class)->get('ThemingDefaults');
|
||||
});
|
||||
|
||||
$this->registerService('Protocol', function (ContainerInterface $c) {
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class Application {
|
|||
IRequest $request,
|
||||
LoggerInterface $logger,
|
||||
MemoryInfo $memoryInfo) {
|
||||
$defaults = \OC::$server->getThemingDefaults();
|
||||
$defaults = \OC::$server->get('ThemingDefaults');
|
||||
$this->config = $config;
|
||||
$this->application = new SymfonyApplication($defaults->getName(), \OC_Util::getVersionString());
|
||||
$this->dispatcher = $dispatcher;
|
||||
|
|
|
|||
|
|
@ -1341,7 +1341,7 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
|
||||
$this->registerService(Defaults::class, function (Server $c) {
|
||||
return new Defaults(
|
||||
$c->getThemingDefaults()
|
||||
$c->get('ThemingDefaults')
|
||||
);
|
||||
});
|
||||
/** @deprecated 19.0.0 */
|
||||
|
|
|
|||
|
|
@ -217,7 +217,7 @@ class URLGenerator implements IURLGenerator {
|
|||
$themingEnabled = $this->config->getSystemValueBool('installed', false) && $this->getAppManager()->isEnabledForUser('theming');
|
||||
$themingImagePath = false;
|
||||
if ($themingEnabled) {
|
||||
$themingDefaults = \OC::$server->getThemingDefaults();
|
||||
$themingDefaults = \OC::$server->get('ThemingDefaults');
|
||||
if ($themingDefaults instanceof ThemingDefaults) {
|
||||
$themingImagePath = $themingDefaults->replaceImagePath($appName, $file);
|
||||
}
|
||||
|
|
@ -290,7 +290,7 @@ class URLGenerator implements IURLGenerator {
|
|||
* @return string url to the online documentation
|
||||
*/
|
||||
public function linkToDocs(string $key): string {
|
||||
$theme = \OC::$server->getThemingDefaults();
|
||||
$theme = \OC::$server->get('ThemingDefaults');
|
||||
return $theme->buildDocLinkToKey($key);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ class Defaults {
|
|||
*/
|
||||
public function __construct(\OC_Defaults $defaults = null) {
|
||||
if ($defaults === null) {
|
||||
$defaults = \OC::$server->getThemingDefaults();
|
||||
$defaults = \OC::$server->get('ThemingDefaults');
|
||||
}
|
||||
$this->defaults = $defaults;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue