[Share 2.0] Add getShareManager to OCP\IServerContainer
This commit is contained in:
parent
357b271cb4
commit
f2e70441e4
|
@ -227,6 +227,10 @@ class DIContainer extends SimpleContainer implements IAppContainer {
|
|||
return $this->getServer()->getSecureRandom();
|
||||
});
|
||||
|
||||
$this->registerService('OCP\\Share\\IManager', function($c) {
|
||||
return $this->getServer()->getShareManager();
|
||||
});
|
||||
|
||||
$this->registerService('OCP\\SystemTag\\ISystemTagManager', function() {
|
||||
return $this->getServer()->getSystemTagManager();
|
||||
});
|
||||
|
|
|
@ -1256,9 +1256,8 @@ class Server extends ServerContainer implements IServerContainer {
|
|||
return \OC_Mount_Config::$app->getContainer()->query('OCA\\Files_External\\Service\\UserStoragesService');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return \OC\Share20\Manager
|
||||
* @return \OCP\Share\IManager
|
||||
*/
|
||||
public function getShareManager() {
|
||||
return $this->query('ShareManager');
|
||||
|
|
|
@ -504,4 +504,12 @@ interface IServerContainer {
|
|||
* @since 9.0.0
|
||||
*/
|
||||
public function getSystemTagObjectMapper();
|
||||
|
||||
/**
|
||||
* Returns the share manager
|
||||
*
|
||||
* @return \OCP\Share\IManager
|
||||
* @since 9.0.0
|
||||
*/
|
||||
public function getShareManager();
|
||||
}
|
||||
|
|
|
@ -139,6 +139,8 @@ class Server extends \Test\TestCase {
|
|||
['Search', '\OCP\ISearch'],
|
||||
['SecureRandom', '\OC\Security\SecureRandom'],
|
||||
['SecureRandom', '\OCP\Security\ISecureRandom'],
|
||||
['ShareManager', '\OC\Share20\Manager'],
|
||||
['ShareManager', '\OCP\Share\IManager'],
|
||||
['SystemConfig', '\OC\SystemConfig'],
|
||||
|
||||
['URLGenerator', '\OC\URLGenerator'],
|
||||
|
|
Loading…
Reference in New Issue