Go to the documentation of this file.
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 );
getLabel()
For a checkbox, the label goes on the right hand side, and is added in getInputHTML(),...
getLabelAlignOOUI()
Get label alignment when generating field for OOUI.
$wgUseMediaWikiUIEverywhere
Temporary variable that applies MediaWiki UI wherever it can be supported.
getInputOOUI( $value)
Get the OOUI version of this field.
static check( $name, $checked=false, $attribs=[])
Convenience function to build an HTML checkbox.
loadDataFromRequest( $request)
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
needsLabel()
checkboxes don't need a label.