10 if ( !empty( $this->mParams[
'invert'] ) ) {
19 if ( $this->mClass !==
'' ) {
24 if ( isset( $attr[
'title'] ) ) {
26 $attrLabel[
'title'] = $attr[
'title'];
29 $chkLabel = Xml::check( $this->mName, $value, $attr ) .
31 Html::rawElement(
'label', $attrLabel, $this->mLabel );
34 $chkLabel = Html::rawElement(
36 [
'class' =>
'mw-ui-checkbox' ],
51 if ( !empty( $this->mParams[
'invert'] ) ) {
59 $attr += OOUI\Element::configFromHtmlAttributes(
63 if ( $this->mClass !==
'' ) {
67 $attr[
'selected'] = $value;
70 return new OOUI\CheckboxInputWidget( $attr );
86 $this->mParent instanceof
HTMLForm &&
117 $invert = isset( $this->mParams[
'invert'] ) && $this->mParams[
'invert'];
122 if ( $this->
isSubmitAttempt( $request ) || $request->getCheck( $this->mName ) ) {
124 ? !$request->getBool( $this->mName )
125 : $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)
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.