php/Widget.php
public function setDisabled( $disabled ) {
		$this->disabled = (bool)$disabled;
		$this->toggleClasses( [ 'oo-ui-widget-disabled' ], $this->disabled );
		$this->toggleClasses( [ 'oo-ui-widget-enabled' ], !$this->disabled );
		$this->setAttributes( [ 'aria-disabled' => $this->disabled ? 'true' : 'false' ] );

		return $this;
	}
public function setDisabled( $disabled ) {
		$this->disabled = (bool)$disabled;
		$this->toggleClasses( [ 'oo-ui-widget-disabled' ], $this->disabled );
		$this->toggleClasses( [ 'oo-ui-widget-enabled' ], !$this->disabled );
		$this->setAttributes( [ 'aria-disabled' => $this->disabled ? 'true' : 'false' ] );

		return $this;
	}
public function setDisabled ( $ disabled ) { $ this -> disabled = ( bool ) $ disabled ; $ this -> toggleClasses ( [ 'oo-ui-widget-disabled' ] , $ this -> disabled ) ; $ this -> toggleClasses ( [ 'oo-ui-widget-enabled' ] , ! $ this -> disabled ) ; $ this -> setAttributes ( [ 'aria-disabled' => $ this -> disabled ? 'true' : 'false' ] ) ; return $ this ; }
Set the disabled state of the widget.

This should probably change the widgets' appearance and prevent it from being used.

@param bool $disabled Disable widget
@return $this
Set the disabled state of the widget .