MediaWiki REL1_32
ResourceLoaderSyntaxHighlightVisualEditorModule.php
Go to the documentation of this file.
1<?php
2
21
22 protected $targets = [ 'desktop', 'mobile' ];
23
29 $scripts = parent::getScript( $context );
30
31 return $scripts . Xml::encodeJsCall(
32 've.dm.MWSyntaxHighlightNode.static.addPygmentsLanguages', [
34 ],
36 ) . Xml::encodeJsCall(
37 've.dm.MWSyntaxHighlightNode.static.addGeshiToPygmentsMap', [
39 ],
41 ) . Xml::encodeJsCall(
42 've.dm.MWSyntaxHighlightNode.static.addPygmentsToAceMap', [
44 ],
46 );
47 }
48
57
62 private function getPygmentsLanguages() {
63 return array_keys( require __DIR__ . '/../SyntaxHighlight.lexers.php' );
64 }
65
66 public function enableModuleContentVersion() {
67 return true;
68 }
69}
Object passed around to modules which contains information about the state of a specific loader reque...
ResourceLoader module based on local JavaScript/CSS files.
array $scripts
List of paths to JavaScript files to always include.
getScriptURLsForDebug(ResourceLoaderContext $context)
Get the URL or URLs to load for this module's JS in debug mode.
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
getScriptURLsForDebug(ResourceLoaderContext $context)
Don't break debug mode by only showing file URLs.
static inDebugMode()
Determine whether debug mode was requested Order of priority is 1) request param, 2) cookie,...
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on and they can depend only on the ResourceLoaderContext $context
Definition hooks.txt:2885