MediaWiki
master
EditWatchlistNormalHTMLForm.php
Go to the documentation of this file.
1
<?php
21
use
MediaWiki\HTMLForm\OOUIHTMLForm
;
22
26
class
EditWatchlistNormalHTMLForm
extends
OOUIHTMLForm
{
27
public
function
getLegend
( $namespace ) {
28
$namespace = (int)substr( $namespace, 2 );
29
30
return
$namespace ==
NS_MAIN
31
? $this->
msg
(
'blanknamespace'
)->text()
32
: $this->
getContext
()->getLanguage()->getFormattedNsText( $namespace );
33
}
34
35
public
function
displaySection
(
36
$fields, $sectionName =
''
, $fieldsetIDPrefix =
''
, &$hasUserVisibleFields =
false
37
) {
38
return
parent::displaySection( $fields, $sectionName,
'editwatchlist-'
, $hasUserVisibleFields );
39
}
40
}
NS_MAIN
const NS_MAIN
Definition
Defines.php:65
EditWatchlistNormalHTMLForm
Extend OOUIHTMLForm purely so we can have a more sensible way of getting the section headers.
Definition
EditWatchlistNormalHTMLForm.php:26
EditWatchlistNormalHTMLForm\displaySection
displaySection( $fields, $sectionName='', $fieldsetIDPrefix='', &$hasUserVisibleFields=false)
Definition
EditWatchlistNormalHTMLForm.php:35
EditWatchlistNormalHTMLForm\getLegend
getLegend( $namespace)
Get a string to go in the "<legend>" of a section fieldset.
Definition
EditWatchlistNormalHTMLForm.php:27
MediaWiki\Context\ContextSource\msg
msg( $key,... $params)
Get a Message object with context set Parameters are the same as wfMessage()
Definition
ContextSource.php:224
MediaWiki\Context\ContextSource\getContext
getContext()
Get the base IContextSource object.
Definition
ContextSource.php:62
MediaWiki\HTMLForm\OOUIHTMLForm
Compact stacked vertical format for forms, implemented using OOUI widgets.
Definition
OOUIHTMLForm.php:37
includes
specials
forms
EditWatchlistNormalHTMLForm.php
Generated on Sat Dec 7 2024 23:25:44 for MediaWiki by
1.10.0