|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
declare(strict_types=1); |
|
4
|
|
|
|
|
5
|
|
|
/* |
|
6
|
|
|
* This file is part of the TYPO3 CMS project. |
|
7
|
|
|
* |
|
8
|
|
|
* It is free software; you can redistribute it and/or modify it under |
|
9
|
|
|
* the terms of the GNU General Public License, either version 2 |
|
10
|
|
|
* of the License, or any later version. |
|
11
|
|
|
* |
|
12
|
|
|
* For the full copyright and license information, please read the |
|
13
|
|
|
* LICENSE.txt file that was distributed with this source code. |
|
14
|
|
|
* |
|
15
|
|
|
* The TYPO3 project - inspiring people to share! |
|
16
|
|
|
*/ |
|
17
|
|
|
|
|
18
|
|
|
namespace TYPO3\CMS\Lowlevel; |
|
19
|
|
|
|
|
20
|
|
|
use Psr\Container\ContainerInterface; |
|
21
|
|
|
use TYPO3\CMS\Backend\Routing\UriBuilder; |
|
22
|
|
|
use TYPO3\CMS\Backend\Template\ModuleTemplateFactory; |
|
23
|
|
|
use TYPO3\CMS\Core\Imaging\IconFactory; |
|
24
|
|
|
use TYPO3\CMS\Core\Package\AbstractServiceProvider; |
|
25
|
|
|
use TYPO3\CMS\Core\Page\PageRenderer; |
|
26
|
|
|
use TYPO3\CMS\Lowlevel\ConfigurationModuleProvider\ProviderRegistry; |
|
27
|
|
|
|
|
28
|
|
|
/** |
|
29
|
|
|
* @internal |
|
30
|
|
|
*/ |
|
31
|
|
|
class ServiceProvider extends AbstractServiceProvider |
|
32
|
|
|
{ |
|
33
|
|
|
protected static function getPackagePath(): string |
|
34
|
|
|
{ |
|
35
|
|
|
return __DIR__ . '/../'; |
|
36
|
|
|
} |
|
37
|
|
|
|
|
38
|
|
|
public function getFactories(): array |
|
39
|
|
|
{ |
|
40
|
|
|
return [ |
|
41
|
|
|
Controller\ConfigurationController::class => [ static::class, 'getConfigurationController' ], |
|
42
|
|
|
Controller\DatabaseIntegrityController::class => [ static::class, 'getDatabaseIntegrityController' ], |
|
43
|
|
|
]; |
|
44
|
|
|
} |
|
45
|
|
|
|
|
46
|
|
|
public static function getConfigurationController(ContainerInterface $container): Controller\ConfigurationController |
|
47
|
|
|
{ |
|
48
|
|
|
return self::new( |
|
49
|
|
|
$container, |
|
50
|
|
|
Controller\ConfigurationController::class, |
|
51
|
|
|
[ |
|
52
|
|
|
$container->get(ProviderRegistry::class), |
|
53
|
|
|
$container->get(PageRenderer::class), |
|
54
|
|
|
$container->get(UriBuilder::class), |
|
55
|
|
|
$container->get(ModuleTemplateFactory::class) |
|
56
|
|
|
] |
|
57
|
|
|
); |
|
58
|
|
|
} |
|
59
|
|
|
|
|
60
|
|
|
public static function getDatabaseIntegrityController(ContainerInterface $container): Controller\DatabaseIntegrityController |
|
61
|
|
|
{ |
|
62
|
|
|
return self::new( |
|
63
|
|
|
$container, |
|
64
|
|
|
Controller\DatabaseIntegrityController::class, |
|
65
|
|
|
[ |
|
66
|
|
|
$container->get(IconFactory::class), |
|
67
|
|
|
$container->get(PageRenderer::class), |
|
68
|
|
|
$container->get(UriBuilder::class), |
|
69
|
|
|
$container->get(ModuleTemplateFactory::class) |
|
70
|
|
|
] |
|
71
|
|
|
); |
|
72
|
|
|
} |
|
73
|
|
|
} |
|
74
|
|
|
|