Skip to content

Commit

Permalink
Merge pull request #28926 from owncloud/stable10-di-theme-service
Browse files Browse the repository at this point in the history
[stable10] Added IThemeService to public API (DIContainer)
  • Loading branch information
Vincent Petry committed Sep 6, 2017
2 parents cfa97cc + c29a648 commit 4a82c4c
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/private/AppFramework/DependencyInjection/DIContainer.php
Expand Up @@ -337,6 +337,10 @@ public function __construct($appName, $urlParams = []){
);
});

$this->registerService('OCP\Theme\IThemeService', function($c) {
return $this->getServer()->getThemeService();
});


/**
* Middleware
Expand Down
7 changes: 7 additions & 0 deletions lib/private/Server.php
Expand Up @@ -92,6 +92,7 @@
use OCP\IServerContainer;
use OCP\ISession;
use OCP\Security\IContentSecurityPolicyManager;
use OCP\Theme\IThemeService;
use Symfony\Component\EventDispatcher\EventDispatcher;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
use OC\Files\External\StoragesBackendService;
Expand Down Expand Up @@ -1508,4 +1509,10 @@ public function getShareManager() {
return $this->query('ShareManager');
}

/**
* @return IThemeService
*/
public function getThemeService() {
return $this->query('\OCP\Theme\IThemeService');
}
}
6 changes: 6 additions & 0 deletions lib/public/IServerContainer.php
Expand Up @@ -531,4 +531,10 @@ public function getDateTimeZone();
* @since 8.0.0
*/
public function getDateTimeFormatter();

/**
* @return \OCP\Theme\IThemeService
* @since 10.0.3
*/
public function getThemeService();
}

0 comments on commit 4a82c4c

Please sign in to comment.