Page Menu
Home
WickedGov Phorge
Search
Configure Global Search
Log In
Files
F4103219
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
()->
getContentLanguageCode
()->
toString
(),
'value'
=>
$info
,
'html'
=>
$this
->
context
->
getOutput
()->
parseAsInterface
(
$info
)
];
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Tue, Aug 18, 17:51 (3 w, 3 d ago)
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
05/61/acf068c9052610abc1ef977b3a32
Default Alt Text
DocumentationAid.php (1 KB)
Attached To
Mode
rMWPROD MediaWiki Production
Attached
Detach File
Event Timeline
Log In to Comment