1 | <?php |
||
20 | final class MapsHooks { |
||
21 | |||
22 | /** |
||
23 | * Adds a link to Admin Links page. |
||
24 | * |
||
25 | * @since 0.7 |
||
26 | * |
||
27 | * @param ALTree $admin_links_tree |
||
28 | * |
||
29 | * @return boolean |
||
30 | */ |
||
31 | public static function addToAdminLinks( ALTree &$admin_links_tree ) { |
||
50 | |||
51 | /** |
||
52 | * Adds global JavaScript variables. |
||
53 | * |
||
54 | * @since 1.0 |
||
55 | * @see http://www.mediawiki.org/wiki/Manual:Hooks/MakeGlobalVariablesScript |
||
56 | * |
||
57 | * @param array &$vars Variables to be added into the output |
||
58 | * |
||
59 | * @return boolean true in all cases |
||
60 | */ |
||
61 | public static function onMakeGlobalVariablesScript( array &$vars ) { |
||
62 | $vars['egMapsScriptPath'] = $GLOBALS['wgScriptPath'] . '/extensions/Maps/'; // TODO: wgExtensionDirectory? |
||
63 | $vars['egMapsDebugJS'] = $GLOBALS['egMapsDebugJS']; |
||
64 | $vars['egMapsAvailableServices'] = $GLOBALS['egMapsAvailableServices']; |
||
65 | $vars['egMapsLeafletLayersApiKeys'] = $GLOBALS['egMapsLeafletLayersApiKeys']; |
||
66 | $vars['egMapsLeafletLayersDark'] = $GLOBALS['egMapsLeafletLayersDark']; |
||
67 | |||
68 | $vars += $GLOBALS['egMapsGlobalJSVars']; |
||
69 | |||
70 | return true; |
||
71 | } |
||
72 | |||
73 | public static function onSkinTemplateNavigation( SkinTemplate $skinTemplate, array &$links ) { |
||
88 | |||
89 | public static function onBeforeDisplayNoArticleText( \Article $article ) { |
||
92 | |||
93 | public static function onShowMissingArticle( \Article $article ) { |
||
101 | |||
102 | private static function shouldShowGeoJsonCreatePageUi( \Article $article ): bool { |
||
106 | |||
107 | public static function onRegisterTags( array &$tags ) { |
||
111 | |||
112 | public static function onChangeTagsAllowedAdd( array &$allowedTags, array $tags, \User $user = null ) { |
||
115 | |||
116 | public static function onResourceLoaderTestModules( array &$modules, $resourceLoader ) { |
||
128 | |||
129 | } |
||
130 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.