17 if ( !empty( $this->mParams[
'invert'] ) ) {
26 if ( $this->mClass !==
'' ) {
31 if ( isset( $attr[
'title'] ) ) {
33 $attrLabel[
'title'] = $attr[
'title'];
36 $chkLabel = Xml::check( $this->mName, $value, $attr ) .
38 Html::rawElement(
'label', $attrLabel, $this->mLabel );
41 $chkLabel = Html::rawElement(
43 [
'class' =>
'mw-ui-checkbox' ],
59 if ( !empty( $this->mParams[
'invert'] ) ) {
67 $attr += OOUI\Element::configFromHtmlAttributes(
71 if ( $this->mClass !==
'' ) {
75 $attr[
'selected'] = $value;
78 return new OOUI\CheckboxInputWidget( $attr );
95 $this->mParent instanceof
HTMLForm &&
129 $invert = isset( $this->mParams[
'invert'] ) && $this->mParams[
'invert'];
134 if ( $this->
isSubmitAttempt( $request ) || $request->getCheck( $this->mName ) ) {
136 ? !$request->getBool( $this->mName )
137 : $request->getBool( $this->mName );
$wgUseMediaWikiUIEverywhere
Temporary variable that applies MediaWiki UI wherever it can be supported.
getLabel()
For a checkbox, the label goes on the right hand side, and is added in getInputHTML(),...
loadDataFromRequest( $request)
Stable to override.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself....
getLabelAlignOOUI()
Get label alignment when generating field for OOUI.
getInputOOUI( $value)
Get the OOUI version of this field.
needsLabel()
checkboxes don't need a label.