MediaWiki REL1_31
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 $lexers = require __DIR__ . '/../SyntaxHighlight.lexers.php';
64 return $lexers;
65 }
66
67 public function enableModuleContentVersion() {
68 return true;
69 }
70}
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:2811