|
7 | 7 | */ |
8 | 8 | namespace OCA\Files; |
9 | 9 |
|
10 | | -use OC\NavigationManager; |
11 | 10 | use OCA\Files\Service\ChunkedUploadConfig; |
12 | | -use OCP\App\IAppManager; |
13 | | -use OCP\EventDispatcher\IEventDispatcher; |
14 | | -use OCP\IConfig; |
15 | | -use OCP\IGroupManager; |
16 | | -use OCP\INavigationManager; |
17 | | -use OCP\IURLGenerator; |
18 | | -use OCP\IUserSession; |
19 | | -use OCP\L10N\IFactory; |
20 | | -use OCP\Server; |
21 | | -use Psr\Log\LoggerInterface; |
22 | 11 |
|
23 | 12 | class App { |
24 | | - private static ?INavigationManager $navigationManager = null; |
25 | | - |
26 | | - /** |
27 | | - * Returns the app's navigation manager |
28 | | - */ |
29 | | - public static function getNavigationManager(): INavigationManager { |
30 | | - // TODO: move this into a service in the Application class |
31 | | - if (self::$navigationManager === null) { |
32 | | - self::$navigationManager = new NavigationManager( |
33 | | - Server::get(IAppManager::class), |
34 | | - Server::get(IUrlGenerator::class), |
35 | | - Server::get(IFactory::class), |
36 | | - Server::get(IUserSession::class), |
37 | | - Server::get(IGroupManager::class), |
38 | | - Server::get(IConfig::class), |
39 | | - Server::get(LoggerInterface::class), |
40 | | - Server::get(IEventDispatcher::class), |
41 | | - ); |
42 | | - self::$navigationManager->clear(false); |
43 | | - } |
44 | | - return self::$navigationManager; |
45 | | - } |
46 | | - |
47 | 13 | public static function extendJsConfig($settings): void { |
48 | 14 | $appConfig = json_decode($settings['array']['oc_appconfig'], true); |
49 | 15 |
|
|
0 commit comments