MediaWiki
REL1_34
ResourceLoaderSyntaxHighlightVisualEditorModule.php
Go to the documentation of this file.
1
<?php
19
class
ResourceLoaderSyntaxHighlightVisualEditorModule
extends
ResourceLoaderFileModule
{
20
21
protected
$targets
= [
'desktop'
,
'mobile'
];
22
27
public
function
getScript
(
ResourceLoaderContext
$context
) {
28
$scripts
= parent::getScript(
$context
);
29
30
return
$scripts
. Xml::encodeJsCall(
31
've.dm.MWSyntaxHighlightNode.static.addPygmentsLanguages'
, [
32
$this->
getPygmentsLanguages
()
33
],
34
ResourceLoader::inDebugMode()
35
) . Xml::encodeJsCall(
36
've.dm.MWSyntaxHighlightNode.static.addGeshiToPygmentsMap'
, [
37
SyntaxHighlightGeSHiCompat::getGeSHiToPygmentsMap
()
38
],
39
ResourceLoader::inDebugMode()
40
) . Xml::encodeJsCall(
41
've.dm.MWSyntaxHighlightNode.static.addPygmentsToAceMap'
, [
42
SyntaxHighlightAce::getPygmentsToAceMap
()
43
],
44
ResourceLoader::inDebugMode()
45
);
46
}
47
52
private
function
getPygmentsLanguages
() {
53
return
array_keys( require __DIR__ .
'/../SyntaxHighlight.lexers.php'
);
54
}
55
59
public
function
enableModuleContentVersion
() {
60
return
true
;
61
}
62
66
public
function
supportsURLLoading
() {
67
return
false
;
68
}
69
}
ResourceLoaderContext
Context object that contains information about the state of a specific ResourceLoader web request.
Definition
ResourceLoaderContext.php:33
ResourceLoaderFileModule
Module based on local JavaScript/CSS files.
Definition
ResourceLoaderFileModule.php:35
ResourceLoaderFileModule\$scripts
array $scripts
List of paths to JavaScript files to always include.
Definition
ResourceLoaderFileModule.php:53
ResourceLoaderSyntaxHighlightVisualEditorModule
This program is free software; you can redistribute it and/or modify it under the terms of the GNU Ge...
Definition
ResourceLoaderSyntaxHighlightVisualEditorModule.php:19
ResourceLoaderSyntaxHighlightVisualEditorModule\enableModuleContentVersion
enableModuleContentVersion()
Definition
ResourceLoaderSyntaxHighlightVisualEditorModule.php:59
ResourceLoaderSyntaxHighlightVisualEditorModule\getScript
getScript(ResourceLoaderContext $context)
Definition
ResourceLoaderSyntaxHighlightVisualEditorModule.php:27
ResourceLoaderSyntaxHighlightVisualEditorModule\getPygmentsLanguages
getPygmentsLanguages()
Get a full list of available languages.
Definition
ResourceLoaderSyntaxHighlightVisualEditorModule.php:52
ResourceLoaderSyntaxHighlightVisualEditorModule\$targets
$targets
Definition
ResourceLoaderSyntaxHighlightVisualEditorModule.php:21
ResourceLoaderSyntaxHighlightVisualEditorModule\supportsURLLoading
supportsURLLoading()
Definition
ResourceLoaderSyntaxHighlightVisualEditorModule.php:66
SyntaxHighlightAce\getPygmentsToAceMap
static getPygmentsToAceMap()
Definition
SyntaxHighlightAce.php:160
SyntaxHighlightGeSHiCompat\getGeSHiToPygmentsMap
static getGeSHiToPygmentsMap()
Definition
SyntaxHighlightGeSHiCompat.php:110
$context
$context
Definition
load.php:45
extensions
SyntaxHighlight_GeSHi
includes
ResourceLoaderSyntaxHighlightVisualEditorModule.php
Generated on Mon Nov 25 2024 16:04:44 for MediaWiki by
1.10.0