Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | |
0.00% |
0 / 43 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | |
3 | /** |
4 | * This program is free software; you can redistribute it and/or modify |
5 | * it under the terms of the GNU General Public License as published by |
6 | * the Free Software Foundation; either version 2 of the License, or |
7 | * (at your option) any later version. |
8 | * |
9 | * This program is distributed in the hope that it will be useful, |
10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
12 | * GNU General Public License for more details. |
13 | * |
14 | * You should have received a copy of the GNU General Public License along |
15 | * with this program; if not, write to the Free Software Foundation, Inc., |
16 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
17 | * http://www.gnu.org/copyleft/gpl.html |
18 | * |
19 | * @file |
20 | */ |
21 | |
22 | use MediaWiki\MediaWikiServices; |
23 | use MediaWiki\Minerva\LanguagesHelper; |
24 | use MediaWiki\Minerva\Menu\Definitions; |
25 | use MediaWiki\Minerva\Menu\PageActions\PageActions; |
26 | use MediaWiki\Minerva\Permissions\IMinervaPagePermissions; |
27 | use MediaWiki\Minerva\Permissions\MinervaPagePermissions; |
28 | use MediaWiki\Minerva\SkinOptions; |
29 | use MediaWiki\Minerva\Skins\SkinUserPageHelper; |
30 | |
31 | return [ |
32 | 'Minerva.Menu.Definitions' => static function ( MediaWikiServices $services ): Definitions { |
33 | return new Definitions( |
34 | $services->getSpecialPageFactory() |
35 | ); |
36 | }, |
37 | 'Minerva.Menu.PageActions' => static function ( MediaWikiServices $services ): PageActions { |
38 | return new PageActions( |
39 | $services->getService( 'Minerva.LanguagesHelper' ), |
40 | $services->getService( 'Minerva.Permissions' ), |
41 | $services->getService( 'Minerva.SkinOptions' ), |
42 | $services->getService( 'Minerva.SkinUserPageHelper' ), |
43 | $services->getWatchlistManager() |
44 | ); |
45 | }, |
46 | 'Minerva.SkinUserPageHelper' => static function ( MediaWikiServices $services ): SkinUserPageHelper { |
47 | return new SkinUserPageHelper( |
48 | $services->getUserFactory(), |
49 | $services->getUserNameUtils() |
50 | ); |
51 | }, |
52 | 'Minerva.LanguagesHelper' => static function ( MediaWikiServices $services ): LanguagesHelper { |
53 | return new LanguagesHelper( |
54 | $services->getLanguageConverterFactory() |
55 | ); |
56 | }, |
57 | 'Minerva.SkinOptions' => static function ( MediaWikiServices $services ): SkinOptions { |
58 | return new SkinOptions( |
59 | $services->getHookContainer(), |
60 | $services->getService( 'Minerva.SkinUserPageHelper' ) |
61 | ); |
62 | }, |
63 | 'Minerva.Permissions' => static function ( MediaWikiServices $services ): IMinervaPagePermissions { |
64 | return new MinervaPagePermissions( |
65 | $services->getService( 'Minerva.SkinOptions' ), |
66 | $services->getService( 'Minerva.LanguagesHelper' ), |
67 | $services->getPermissionManager(), |
68 | $services->getContentHandlerFactory(), |
69 | $services->getUserFactory(), |
70 | $services->getWatchlistManager() |
71 | ); |
72 | } |
73 | ]; |