48 $field = parent::loadInputFromParameters( $fieldname, $descriptor, $parent );
49 $field->setShowEmptyLabel(
false );
53 public function getHTML( $submitResult ) {
60 'mediawiki.ui.button',
62 'mediawiki.ui.checkbox',
65 return parent::getHTML( $submitResult );
69 $attribs = parent::getFormAttributes();
70 $attribs[
'class'] = [
'mw-htmlform',
'mw-ui-vform',
'mw-ui-container' ];
82 if ( $this->mShowSubmit ) {
85 if ( isset( $this->mSubmitID ) ) {
89 if ( isset( $this->mSubmitName ) ) {
93 if ( isset( $this->mSubmitTooltip ) ) {
99 'mw-ui-button mw-ui-big mw-ui-block',
101 foreach ( $this->mSubmitFlags as $flag ) {
102 $attribs[
'class'][] =
'mw-ui-' . $flag;
108 if ( $this->mShowReset ) {
109 $buttons .= Html::element(
113 'value' => $this->
msg(
'htmlform-reset' )->
text(),
114 'class' =>
'mw-ui-button mw-ui-big mw-ui-block',
119 if ( $this->mShowCancel ) {
120 $target = $this->mCancelTarget ?: Title::newMainPage();
121 if ( $target instanceof
Title ) {
122 $target = $target->getLocalURL();
124 $buttons .= Html::element(
127 'class' =>
'mw-ui-button mw-ui-big mw-ui-block',
134 foreach ( $this->mButtons as $button ) {
137 'name' => $button[
'name'],
138 'value' => $button[
'value']
141 if ( $button[
'attribs'] ) {
142 $attrs += $button[
'attribs'];
145 if ( isset( $button[
'id'] ) ) {
146 $attrs[
'id'] = $button[
'id'];
149 $attrs[
'class'] = isset( $attrs[
'class'] ) ? (
array)$attrs[
'class'] : [];
150 $attrs[
'class'][] =
'mw-ui-button mw-ui-big mw-ui-block';
152 $buttons .= Html::element(
'input', $attrs ) .
"\n";
159 return Html::rawElement(
'div',
160 [
'class' =>
'mw-htmlform-submit-buttons' ],
"\n$buttons" ) .
"\n";
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Throws a warning that $function is deprecated.
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
getOutput()
Get the OutputPage object.
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[])
Returns the attributes for the tooltip and access key.
Represents a title within MediaWiki.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
the array() calling protocol came about after MediaWiki 1.4rc1.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses & $html
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses just before the function returns a value If you return an< a > element with HTML attributes $attribs and contents $html will be returned If you return $ret will be returned and may include noclasses after processing & $attribs