2019-04-10 12:52:34 +00:00
|
|
|
<?php
|
|
|
|
|
2019-04-08 17:08:57 +00:00
|
|
|
/**
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License along
|
|
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
|
|
* http://www.gnu.org/copyleft/gpl.html
|
|
|
|
*
|
|
|
|
* @file
|
|
|
|
*/
|
|
|
|
|
2019-04-10 12:52:34 +00:00
|
|
|
use MediaWiki\MediaWikiServices;
|
2019-07-09 16:10:31 +00:00
|
|
|
use MediaWiki\Minerva\LanguagesHelper;
|
2019-04-08 17:08:57 +00:00
|
|
|
use MediaWiki\Minerva\Menu\Definitions;
|
2024-05-19 12:30:25 +00:00
|
|
|
use MediaWiki\Minerva\Menu\PageActions\PageActions;
|
2019-05-24 00:07:27 +00:00
|
|
|
use MediaWiki\Minerva\Permissions\IMinervaPagePermissions;
|
2020-01-26 19:26:31 +00:00
|
|
|
use MediaWiki\Minerva\Permissions\MinervaPagePermissions;
|
2019-04-10 21:43:50 +00:00
|
|
|
use MediaWiki\Minerva\SkinOptions;
|
2020-05-01 01:16:53 +00:00
|
|
|
use MediaWiki\Minerva\Skins\SkinUserPageHelper;
|
2019-04-10 12:52:34 +00:00
|
|
|
|
|
|
|
return [
|
2021-05-03 14:12:42 +00:00
|
|
|
'Minerva.Menu.Definitions' => static function ( MediaWikiServices $services ): Definitions {
|
2021-11-23 09:18:46 +00:00
|
|
|
return new Definitions(
|
2024-03-28 08:26:54 +00:00
|
|
|
$services->getSpecialPageFactory()
|
2021-11-23 09:18:46 +00:00
|
|
|
);
|
2019-07-25 10:34:50 +00:00
|
|
|
},
|
2024-05-19 12:30:25 +00:00
|
|
|
'Minerva.Menu.PageActions' => static function ( MediaWikiServices $services ): PageActions {
|
|
|
|
return new PageActions(
|
|
|
|
$services->getService( 'Minerva.LanguagesHelper' ),
|
|
|
|
$services->getService( 'Minerva.Permissions' ),
|
|
|
|
$services->getService( 'Minerva.SkinOptions' ),
|
|
|
|
$services->getService( 'Minerva.SkinUserPageHelper' ),
|
|
|
|
$services->getWatchlistManager()
|
|
|
|
);
|
|
|
|
},
|
2021-05-03 14:12:42 +00:00
|
|
|
'Minerva.SkinUserPageHelper' => static function ( MediaWikiServices $services ): SkinUserPageHelper {
|
2019-07-31 11:10:57 +00:00
|
|
|
return new SkinUserPageHelper(
|
2024-03-24 09:19:59 +00:00
|
|
|
$services->getUserFactory(),
|
|
|
|
$services->getUserNameUtils()
|
2019-07-31 11:10:57 +00:00
|
|
|
);
|
2019-04-10 21:43:50 +00:00
|
|
|
},
|
2024-03-02 19:34:53 +00:00
|
|
|
'Minerva.LanguagesHelper' => static function ( MediaWikiServices $services ): LanguagesHelper {
|
|
|
|
return new LanguagesHelper(
|
2024-03-23 21:43:33 +00:00
|
|
|
$services->getLanguageConverterFactory()
|
2024-03-02 19:34:53 +00:00
|
|
|
);
|
2019-07-09 16:10:31 +00:00
|
|
|
},
|
2024-03-03 13:31:09 +00:00
|
|
|
'Minerva.SkinOptions' => static function ( MediaWikiServices $services ): SkinOptions {
|
|
|
|
return new SkinOptions(
|
2024-03-24 10:49:33 +00:00
|
|
|
$services->getHookContainer(),
|
|
|
|
$services->getService( 'Minerva.SkinUserPageHelper' )
|
2024-03-03 13:31:09 +00:00
|
|
|
);
|
2019-05-24 00:07:27 +00:00
|
|
|
},
|
2021-05-03 14:12:42 +00:00
|
|
|
'Minerva.Permissions' => static function ( MediaWikiServices $services ): IMinervaPagePermissions {
|
2024-03-23 17:31:24 +00:00
|
|
|
return new MinervaPagePermissions(
|
2019-10-08 17:22:31 +00:00
|
|
|
$services->getService( 'Minerva.SkinOptions' ),
|
|
|
|
$services->getService( 'Minerva.LanguagesHelper' ),
|
2021-05-28 20:15:31 +00:00
|
|
|
$services->getPermissionManager(),
|
2023-07-17 17:31:07 +00:00
|
|
|
$services->getContentHandlerFactory(),
|
2024-02-26 07:35:55 +00:00
|
|
|
$services->getUserFactory(),
|
|
|
|
$services->getWatchlistManager()
|
2019-10-08 17:22:31 +00:00
|
|
|
);
|
2019-04-10 12:52:34 +00:00
|
|
|
}
|
|
|
|
];
|