Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4141374
DocumentationAid.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DocumentationAid.php
View Options
<?php
declare
(
strict_types
=
1
);
namespace
MediaWiki\Extension\Translate\TranslatorInterface\Aid
;
use
MediaWiki\Extension\Translate\TranslatorInterface\TranslationHelperException
;
use
MediaWiki\Extension\Translate\Utilities\Utilities
;
use
MediaWiki\MediaWikiServices
;
/**
* Translation aid that provides the message documentation.
* @author Niklas Laxström
* @license GPL-2.0-or-later
* @since 2013-01-01
* @ingroup TranslationAids
*/
class
DocumentationAid
extends
TranslationAid
{
public
function
getData
():
array
{
global
$wgTranslateDocumentationLanguageCode
;
if
(
!
$wgTranslateDocumentationLanguageCode
)
{
throw
new
TranslationHelperException
(
'Message documentation is disabled'
);
}
$page
=
$this
->
handle
->
getKey
();
$ns
=
$this
->
handle
->
getTitle
()->
getNamespace
();
$info
=
Utilities
::
getMessageContent
(
$page
,
$wgTranslateDocumentationLanguageCode
,
$ns
)
??
''
;
return
[
'language'
=>
MediaWikiServices
::
getInstance
()->
getContentLanguage
()->
getCode
(),
'value'
=>
$info
,
'html'
=>
$this
->
context
->
getOutput
()->
parseAsInterface
(
$info
)
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Wed, Aug 19, 15:55 (3 w, 6 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
85/9a/b8319a587a02804011c73dc89ae2
Default Alt Text
DocumentationAid.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment