Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
| Total | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
CRAP | |
0.00% |
0 / 1 |
| CommunityConfigurationHooks | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 1 |
| onCommunityConfigurationProvider_initList | |
0.00% |
0 / 2 |
|
0.00% |
0 / 1 |
6 | |||
| 1 | <?php |
| 2 | |
| 3 | namespace MediaWiki\Babel\Config; |
| 4 | |
| 5 | use MediaWiki\Babel\Utils; |
| 6 | use MediaWiki\Extension\CommunityConfiguration\Hooks\CommunityConfigurationProvider_initListHook; |
| 7 | |
| 8 | /** |
| 9 | * Hooks for CommunityConfiguration |
| 10 | * |
| 11 | * @note Needs to be separate from Hooks to keep CommunityConfiguration a soft dependency. |
| 12 | */ |
| 13 | class CommunityConfigurationHooks implements CommunityConfigurationProvider_initListHook { |
| 14 | |
| 15 | /** |
| 16 | * @inheritDoc |
| 17 | */ |
| 18 | public function onCommunityConfigurationProvider_initList( array &$providers ) { |
| 19 | if ( !Utils::useCommunityConfiguration() ) { |
| 20 | // Do not show the Babel provider in the dashboard when CommunityConfiguration is not in |
| 21 | // use (to avoid user confusion). |
| 22 | unset( $providers['Babel'] ); |
| 23 | } |
| 24 | } |
| 25 | } |