mirror of
https://github.com/nextcloud/server.git
synced 2026-06-09 08:44:07 -04:00
Merge pull request #40125 from summersab/refactor/OC-Server-getThemingDefaults
This commit is contained in:
commit
27886aa184
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) {
|
||||
|
|
|
|||
|
|
@ -59,7 +59,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;
|
||||
|
|
|
|||
|
|
@ -1348,7 +1348,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 */
|
||||
|
|
|
|||
|
|
@ -226,7 +226,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);
|
||||
}
|
||||
|
|
@ -299,7 +299,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