24use MediaWiki\HookContainer\ProtectedHookAccessorTrait;
151 use ProtectedHookAccessorTrait;
154 public static $typeMappings = [
155 'api' => HTMLApiField::class,
156 'text' => HTMLTextField::class,
157 'textwithbutton' => HTMLTextFieldWithButton::class,
158 'textarea' => HTMLTextAreaField::class,
159 'select' => HTMLSelectField::class,
160 'combobox' => HTMLComboboxField::class,
161 'radio' => HTMLRadioField::class,
162 'multiselect' => HTMLMultiSelectField::class,
163 'limitselect' => HTMLSelectLimitField::class,
164 'check' => HTMLCheckField::class,
165 'toggle' => HTMLCheckField::class,
166 'int' => HTMLIntField::class,
167 'file' => HTMLFileField::class,
168 'float' => HTMLFloatField::class,
169 'info' => HTMLInfoField::class,
170 'selectorother' => HTMLSelectOrOtherField::class,
171 'selectandother' => HTMLSelectAndOtherField::class,
172 'namespaceselect' => HTMLSelectNamespace::class,
173 'namespaceselectwithbutton' => HTMLSelectNamespaceWithButton::class,
174 'tagfilter' => HTMLTagFilter::class,
175 'sizefilter' => HTMLSizeFilterField::class,
176 'submit' => HTMLSubmitField::class,
177 'hidden' => HTMLHiddenField::class,
178 'edittools' => HTMLEditTools::class,
179 'checkmatrix' => HTMLCheckMatrix::class,
180 'cloner' => HTMLFormFieldCloner::class,
181 'autocompleteselect' => HTMLAutoCompleteSelectField::class,
182 'language' => HTMLSelectLanguageField::class,
183 'date' => HTMLDateTimeField::class,
184 'time' => HTMLDateTimeField::class,
185 'datetime' => HTMLDateTimeField::class,
186 'expiry' => HTMLExpiryField::class,
190 'email' => HTMLTextField::class,
191 'password' => HTMLTextField::class,
192 'url' => HTMLTextField::class,
193 'title' => HTMLTitleTextField::class,
194 'user' => HTMLUserTextField::class,
195 'tagmultiselect' => HTMLTagMultiselectField::class,
196 'usersmultiselect' => HTMLUsersMultiselectField::class,
197 'titlesmultiselect' => HTMLTitlesMultiselectField::class,
198 'namespacesmultiselect' => HTMLNamespacesMultiselectField::class,
206 protected $mFlatFields = [];
211 protected $mSubmitFlags = [
'primary',
'progressive' ];
248 protected $mAction =
false;
255 protected $mCollapsible =
false;
262 protected $mCollapsed =
false;
276 protected $mHiddenFields = [];
281 protected $mButtons = [];
290 protected $mTokenSalt =
'';
300 protected $mSubSectionBeforeFields =
true;
307 protected $displayFormat =
'table';
313 protected $availableDisplayFormats = [
324 protected $availableSubclassDisplayFormats = [
333 private $hiddenTitleAddedToForm =
false;
349 $displayFormat, $descriptor,
IContextSource $context, $messagePrefix =
''
351 switch ( $displayFormat ) {
353 return new VFormHTMLForm( $descriptor, $context, $messagePrefix );
355 return new OOUIHTMLForm( $descriptor, $context, $messagePrefix );
357 $form =
new self( $descriptor, $context, $messagePrefix );
358 $form->setDisplayFormat( $displayFormat );
378 $this->mMessagePrefix = $messagePrefix;
382 !$this->
getConfig()->
get( MainConfigNames::HTMLFormAllowTableFormat )
383 && $this->displayFormat ===
'table'
385 $this->displayFormat =
'div';
401 $loadedDescriptor = [];
403 foreach ( $descriptor as $fieldname => $info ) {
405 $section = $info[
'section'] ??
'';
407 if ( isset( $info[
'type'] ) && $info[
'type'] ===
'file' ) {
408 $this->mUseMultipart =
true;
411 $field = static::loadInputFromParameters( $fieldname, $info, $this );
413 $setSection =& $loadedDescriptor;
415 foreach ( explode(
'/', $section ) as $newName ) {
416 if ( !isset( $setSection[$newName] ) ) {
417 $setSection[$newName] = [];
420 $setSection =& $setSection[$newName];
424 $setSection[$fieldname] = $field;
425 $this->mFlatFields[$fieldname] = $field;
428 $this->mFieldTree = array_merge( $this->mFieldTree, $loadedDescriptor );
438 return isset( $this->mFlatFields[$fieldname] );
447 if ( !$this->
hasField( $fieldname ) ) {
448 throw new DomainException( __METHOD__ .
': no field named ' . $fieldname );
450 return $this->mFlatFields[$fieldname];
465 in_array( $format, $this->availableSubclassDisplayFormats,
true ) ||
466 in_array( $this->displayFormat, $this->availableSubclassDisplayFormats,
true )
468 throw new MWException(
'Cannot change display format after creation, ' .
469 'use HTMLForm::factory() instead' );
472 if ( !in_array( $format, $this->availableDisplayFormats,
true ) ) {
473 throw new MWException(
'Display format must be one of ' .
476 $this->availableDisplayFormats,
477 $this->availableSubclassDisplayFormats
484 if ( !$this->
getConfig()->
get( MainConfigNames::HTMLFormAllowTableFormat ) &&
485 $format ===
'table' ) {
489 $this->displayFormat = $format;
500 return $this->displayFormat;
521 if ( isset( $descriptor[
'class'] ) ) {
522 $class = $descriptor[
'class'];
523 } elseif ( isset( $descriptor[
'type'] ) ) {
524 $class = static::$typeMappings[$descriptor[
'type']];
525 $descriptor[
'class'] = $class;
531 throw new MWException(
"Descriptor with no class for $fieldname: "
532 . print_r( $descriptor,
true ) );
553 $class = static::getClassFromDescriptor( $fieldname, $descriptor );
555 $descriptor[
'fieldname'] = $fieldname;
557 $descriptor[
'parent'] = $parent;
560 # @todo This will throw a fatal error whenever someone try to use
561 # 'class' to feed a CSS class instead of 'cssclass'. Would be
562 # great to avoid the fatal error and show a nice error.
563 return new $class( $descriptor );
576 # Load data from the request.
578 $this->mFormIdentifier ===
null ||
579 $this->
getRequest()->getVal(
'wpFormIdentifier' ) === $this->mFormIdentifier
583 $this->mFieldData = [];
596 if ( $this->mFormIdentifier ===
null ) {
599 $identOkay = $this->
getRequest()->getVal(
'wpFormIdentifier' ) === $this->mFormIdentifier;
605 } elseif ( $this->
getRequest()->wasPosted() ) {
606 $editToken = $this->
getRequest()->getVal(
'wpEditToken' );
607 if ( $this->
getUser()->isRegistered() || $editToken !==
null ) {
611 $tokenOkay = $this->
getUser()->matchEditToken( $editToken, $this->mTokenSalt );
617 if ( $tokenOkay && $identOkay ) {
618 $this->mWasSubmitted =
true;
636 if ( $result ===
true || ( $result instanceof
Status && $result->
isGood() ) ) {
674 $hoistedErrors = Status::newGood();
675 if ( $this->mValidationErrorMessage ) {
676 foreach ( $this->mValidationErrorMessage as $error ) {
677 $hoistedErrors->fatal( ...$error );
680 $hoistedErrors->fatal(
'htmlform-invalid-input' );
683 $this->mWasSubmitted =
true;
685 # Check for cancelled submission
686 foreach ( $this->mFlatFields as $fieldname => $field ) {
687 if ( !array_key_exists( $fieldname, $this->mFieldData ) ) {
690 if ( $field->cancelSubmit( $this->mFieldData[$fieldname], $this->mFieldData ) ) {
691 $this->mWasSubmitted =
false;
696 # Check for validation
697 foreach ( $this->mFlatFields as $fieldname => $field ) {
698 if ( !array_key_exists( $fieldname, $this->mFieldData ) ) {
701 if ( $field->isDisabled( $this->mFieldData ) ) {
704 $res = $field->validate( $this->mFieldData[$fieldname], $this->mFieldData );
705 if (
$res !==
true ) {
707 if (
$res !==
false && !$field->canDisplayErrors() ) {
708 if ( is_string(
$res ) ) {
709 $hoistedErrors->fatal(
'rawmessage',
$res );
711 $hoistedErrors->fatal(
$res );
718 return $hoistedErrors;
721 $callback = $this->mSubmitCallback;
722 if ( !is_callable( $callback ) ) {
723 throw new MWException(
'HTMLForm: no submit callback provided. Use ' .
724 'setSubmitCallback() to set one.' );
729 $res = call_user_func( $callback, $data, $this );
730 if (
$res ===
false ) {
731 $this->mWasSubmitted =
false;
752 return $this->mWasSubmitted;
766 $this->mSubmitCallback = $cb;
781 $this->mValidationErrorMessage = $msg;
821 $this->mPre .= $html;
881 if ( $section ===
null ) {
882 $this->mHeader .= $html;
884 if ( !isset( $this->mSectionHeaders[$section] ) ) {
885 $this->mSectionHeaders[$section] =
'';
887 $this->mSectionHeaders[$section] .= $html;
903 if ( $section ===
null ) {
904 $this->mHeader = $html;
906 $this->mSectionHeaders[$section] = $html;
921 if ( $section ===
null ) {
922 return $this->mHeader;
924 return $this->mSectionHeaders[$section] ??
'';
978 if ( $section ===
null ) {
979 $this->mFooter .= $html;
981 if ( !isset( $this->mSectionFooters[$section] ) ) {
982 $this->mSectionFooters[$section] =
'';
984 $this->mSectionFooters[$section] .= $html;
1000 if ( $section ===
null ) {
1001 $this->mFooter = $html;
1003 $this->mSectionFooters[$section] = $html;
1017 if ( $section ===
null ) {
1018 return $this->mFooter;
1020 return $this->mSectionFooters[$section] ??
'';
1072 $this->mPost .= $html;
1086 $this->mPost = $html;
1098 return $this->mPost;
1135 $attribs += [
'name' => $name ];
1136 $this->mHiddenFields[] = [ $value, $attribs ];
1152 foreach ( $fields as $name => $value ) {
1153 $this->mHiddenFields[] = [ $value, [
'name' => $name ] ];
1183 if ( !is_array( $data ) ) {
1184 $args = func_get_args();
1185 if ( count(
$args ) < 2 || count(
$args ) > 4 ) {
1186 throw new InvalidArgumentException(
1187 'Incorrect number of arguments for deprecated calling style'
1192 'value' =>
$args[1],
1193 'id' =>
$args[2] ??
null,
1194 'attribs' =>
$args[3] ??
null,
1197 if ( !isset( $data[
'name'] ) ) {
1198 throw new InvalidArgumentException(
'A name is required' );
1200 if ( !isset( $data[
'value'] ) ) {
1201 throw new InvalidArgumentException(
'A value is required' );
1204 $this->mButtons[] = $data + [
1224 $this->mTokenSalt = $salt;
1251 private function getHiddenTitle(): string {
1252 if ( $this->hiddenTitleAddedToForm ) {
1262 $this->hiddenTitleAddedToForm =
true;
1277 # For good measure (it is the default)
1278 $this->getOutput()->setPreventClickjacking(
true );
1279 $this->getOutput()->addModules(
'mediawiki.htmlform' );
1280 $this->getOutput()->addModuleStyles(
'mediawiki.htmlform.styles' );
1282 if ( $this->mCollapsible ) {
1284 $this->getOutput()->addModules(
'jquery.makeCollapsible' );
1288 . $this->getErrorsOrWarnings( $submitResult,
'error' )
1289 . $this->getErrorsOrWarnings( $submitResult,
'warning' )
1290 . $this->getHeaderText()
1291 . $this->getHiddenTitle()
1293 . $this->getHiddenFields()
1294 . $this->getButtons()
1295 . $this->getFooterText();
1297 $html = $this->wrapForm( $html );
1299 return '' . $this->mPre . $html . $this->mPost;
1310 $this->mCollapsible =
true;
1311 $this->mCollapsed = $collapsedByDefault;
1321 # Use multipart/form-data
1322 $encType = $this->mUseMultipart
1323 ?
'multipart/form-data'
1324 :
'application/x-www-form-urlencoded';
1327 'class' =>
'mw-htmlform',
1328 'action' => $this->getAction(),
1329 'method' => $this->getMethod(),
1330 'enctype' => $encType,
1333 $attribs[
'id'] = $this->mId;
1335 if ( is_string( $this->mAutocomplete ) ) {
1336 $attribs[
'autocomplete'] = $this->mAutocomplete;
1338 if ( $this->mName ) {
1339 $attribs[
'name'] = $this->mName;
1341 if ( $this->needsJSForHtml5FormValidation() ) {
1342 $attribs[
'novalidate'] =
true;
1356 # Include a <fieldset> wrapper for style, if requested.
1357 if ( $this->mWrapperLegend !==
false ) {
1358 $legend = is_string( $this->mWrapperLegend ) ? $this->mWrapperLegend :
false;
1359 $html = Xml::fieldset( $legend, $html, $this->mWrapperAttributes );
1362 return Html::rawElement(
1364 $this->getFormAttributes(),
1378 $html .= $this->getHiddenTitle();
1380 if ( $this->mFormIdentifier !==
null ) {
1381 $html .= Html::hidden(
1383 $this->mFormIdentifier
1386 if ( $this->getMethod() ===
'post' ) {
1387 $html .= Html::hidden(
1389 $this->
getUser()->getEditToken( $this->mTokenSalt ),
1390 [
'id' =>
'wpEditToken' ]
1394 foreach ( $this->mHiddenFields as [ $value, $attribs ] ) {
1395 $html .= Html::hidden( $attribs[
'name'], $value, $attribs ) .
"\n";
1408 $useMediaWikiUIEverywhere =
1409 $this->getConfig()->get( MainConfigNames::UseMediaWikiUIEverywhere );
1411 if ( $this->mShowSubmit ) {
1414 if ( isset( $this->mSubmitID ) ) {
1415 $attribs[
'id'] = $this->mSubmitID;
1418 if ( isset( $this->mSubmitName ) ) {
1419 $attribs[
'name'] = $this->mSubmitName;
1422 if ( isset( $this->mSubmitTooltip ) ) {
1426 $attribs[
'class'] = [
'mw-htmlform-submit' ];
1428 if ( $useMediaWikiUIEverywhere ) {
1429 foreach ( $this->mSubmitFlags as $flag ) {
1430 $attribs[
'class'][] =
'mw-ui-' . $flag;
1432 $attribs[
'class'][] =
'mw-ui-button';
1435 $buttons .= Xml::submitButton( $this->getSubmitText(), $attribs ) .
"\n";
1438 if ( $this->mShowReset ) {
1439 $buttons .= Html::element(
1443 'value' => $this->msg(
'htmlform-reset' )->text(),
1444 'class' => $useMediaWikiUIEverywhere ?
'mw-ui-button' :
null,
1449 if ( $this->mShowCancel ) {
1450 $target = $this->getCancelTargetURL();
1451 $buttons .= Html::element(
1454 'class' => $useMediaWikiUIEverywhere ?
'mw-ui-button' :
null,
1457 $this->msg(
'cancel' )->text()
1461 foreach ( $this->mButtons as $button ) {
1464 'name' => $button[
'name'],
1465 'value' => $button[
'value']
1468 if ( isset( $button[
'label-message'] ) ) {
1469 $label = $this->getMessage( $button[
'label-message'] )->parse();
1470 } elseif ( isset( $button[
'label'] ) ) {
1471 $label = htmlspecialchars( $button[
'label'] );
1472 } elseif ( isset( $button[
'label-raw'] ) ) {
1473 $label = $button[
'label-raw'];
1475 $label = htmlspecialchars( $button[
'value'] );
1479 if ( $button[
'attribs'] ) {
1481 $attrs += $button[
'attribs'];
1484 if ( isset( $button[
'id'] ) ) {
1485 $attrs[
'id'] = $button[
'id'];
1488 if ( $useMediaWikiUIEverywhere ) {
1489 $attrs[
'class'] = isset( $attrs[
'class'] ) ? (array)$attrs[
'class'] : [];
1490 $attrs[
'class'][] =
'mw-ui-button';
1493 $buttons .= Html::rawElement(
'button', $attrs, $label ) .
"\n";
1500 return Html::rawElement(
'span',
1501 [
'class' =>
'mw-htmlform-submit-buttons' ],
"\n$buttons" ) .
"\n";
1510 return $this->displaySection( $this->mFieldTree, $this->mTableId );
1523 if ( !in_array( $elementsType, [
'error',
'warning' ],
true ) ) {
1524 throw new DomainException( $elementsType .
' is not a valid type.' );
1526 $elementstr =
false;
1527 if ( $elements instanceof
Status ) {
1528 list( $errorStatus, $warningStatus ) = $elements->splitByErrorType();
1529 $status = $elementsType ===
'error' ? $errorStatus : $warningStatus;
1530 if ( $status->isGood() ) {
1533 $elementstr = $status
1535 ->setContext( $this )
1536 ->setInterfaceMessageFlag(
true )
1539 } elseif ( $elementsType ===
'error' ) {
1540 if ( is_array( $elements ) ) {
1541 $elementstr = $this->formatErrors( $elements );
1542 } elseif ( $elements && $elements !==
true ) {
1543 $elementstr = (string)$elements;
1547 if ( !$elementstr ) {
1549 } elseif ( $elementsType ===
'error' ) {
1550 return Html::errorBox( $elementstr );
1552 return Html::warningBox( $elementstr );
1566 foreach ( $errors as $error ) {
1567 $errorstr .= Html::rawElement(
1570 $this->getMessage( $error )->parse()
1574 $errorstr = Html::rawElement(
'ul', [], $errorstr );
1587 $this->mSubmitText =
$t;
1599 $this->mSubmitFlags = [
'destructive',
'primary' ];
1613 if ( !$msg instanceof
Message ) {
1614 $msg = $this->msg( $msg );
1616 $this->setSubmitText( $msg->text() );
1626 return $this->mSubmitText ?: $this->msg(
'htmlform-submit' )->text();
1635 $this->mSubmitName = $name;
1646 $this->mSubmitTooltip = $name;
1660 $this->mSubmitID =
$t;
1681 $this->mFormIdentifier = $ident;
1697 $this->mShowSubmit = !$suppressSubmit;
1709 $this->mShowCancel = $show;
1721 $target = TitleValue::castPageToLinkTarget( $target );
1724 $this->mCancelTarget = $target;
1733 if ( is_string( $this->mCancelTarget ) ) {
1734 return $this->mCancelTarget;
1737 $target = Title::castFromLinkTarget( $this->mCancelTarget ) ?: Title::newMainPage();
1738 return $target->getLocalURL();
1752 $this->mTableId = $id;
1773 $this->mName = $name;
1790 $this->mWrapperLegend = $legend;
1803 $this->mWrapperAttributes = $attributes;
1818 if ( !$msg instanceof
Message ) {
1819 $msg = $this->msg( $msg );
1821 $this->setWrapperLegend( $msg->text() );
1836 $this->mMessagePrefix = $p;
1850 $this->mTitle = Title::castFromPageReference(
$t );
1859 return $this->mTitle ?: $this->
getContext()->getTitle();
1870 $this->mMethod = strtolower( $method );
1879 return $this->mMethod;
1893 return Xml::fieldset( $legend, $section, $attributes ) .
"\n";
1915 $fieldsetIDPrefix =
'',
1916 &$hasUserVisibleFields =
false
1918 if ( $this->mFieldData ===
null ) {
1919 throw new LogicException(
'HTMLForm::displaySection() called on uninitialized field data. '
1920 .
'You probably called displayForm() without calling prepareForm() first.' );
1923 $displayFormat = $this->getDisplayFormat();
1926 $subsectionHtml =
'';
1931 $getFieldHtmlMethod = $displayFormat ===
'table' ?
'getTableRow' : (
'get' . $displayFormat );
1933 foreach ( $fields as $key => $value ) {
1935 $v = array_key_exists( $key, $this->mFieldData )
1936 ? $this->mFieldData[$key]
1937 : $value->getDefault();
1939 $retval = $value->$getFieldHtmlMethod( $v );
1943 if ( $value->hasVisibleOutput() ) {
1946 $labelValue = trim( $value->getLabel() );
1947 if ( $labelValue !==
"\u{00A0}" && $labelValue !==
' ' && $labelValue !==
'' ) {
1951 $hasUserVisibleFields =
true;
1953 } elseif ( is_array( $value ) ) {
1954 $subsectionHasVisibleFields =
false;
1956 $this->displaySection( $value,
1958 "$fieldsetIDPrefix$key-",
1959 $subsectionHasVisibleFields );
1962 if ( $subsectionHasVisibleFields ===
true ) {
1964 $hasUserVisibleFields =
true;
1966 $legend = $this->getLegend( $key );
1968 $section = $this->getHeaderText( $key ) .
1970 $this->getFooterText( $key );
1973 if ( $fieldsetIDPrefix ) {
1974 $attributes[
'id'] = Sanitizer::escapeIdForAttribute(
"$fieldsetIDPrefix$key" );
1976 $subsectionHtml .= $this->wrapFieldSetSection(
1977 $legend, $section, $attributes, $fields === $this->mFieldTree
1981 $subsectionHtml .= $section;
1986 $html = $this->formatSection( $html, $sectionName, $hasLabel );
1988 if ( $subsectionHtml ) {
1989 if ( $this->mSubSectionBeforeFields ) {
1990 return $subsectionHtml .
"\n" . $html;
1992 return $html .
"\n" . $subsectionHtml;
2007 protected function formatSection( array $fieldsHtml, $sectionName, $anyFieldHasLabel ) {
2008 if ( !$fieldsHtml ) {
2014 $displayFormat = $this->getDisplayFormat();
2015 $html = implode(
'', $fieldsHtml );
2017 if ( $displayFormat ===
'raw' ) {
2023 if ( !$anyFieldHasLabel ) {
2024 $classes[] =
'mw-htmlform-nolabel';
2027 $attribs = [
'class' => $classes ];
2029 if ( $sectionName ) {
2030 $attribs[
'id'] = Sanitizer::escapeIdForAttribute( $sectionName );
2033 if ( $displayFormat ===
'table' ) {
2034 return Html::rawElement(
'table',
2036 Html::rawElement(
'tbody', [],
"\n$html\n" ) ) .
"\n";
2037 } elseif ( $displayFormat ===
'inline' ) {
2038 return Html::rawElement(
'span', $attribs,
"\n$html\n" );
2040 return Html::rawElement(
'div', $attribs,
"\n$html\n" );
2048 $this->prepareForm();
2056 $request = $this->getRequest();
2058 foreach ( $this->mFlatFields as $fieldname => $field ) {
2059 if ( $field->skipLoadData( $request ) ) {
2062 if ( $field->mParams[
'disabled'] ??
false ) {
2063 $fieldData[$fieldname] = $field->getDefault();
2065 $fieldData[$fieldname] = $field->loadDataFromRequest( $request );
2071 foreach ( $fieldData as $name => &$value ) {
2072 $field = $this->mFlatFields[$name];
2073 if ( $field->isDisabled( $fieldData ) ) {
2074 $value = $field->getDefault();
2079 foreach ( $fieldData as $name => &$value ) {
2080 $field = $this->mFlatFields[$name];
2081 $value = $field->filter( $value, $fieldData );
2084 $this->mFieldData = $fieldData;
2095 $this->mShowReset = !$suppressReset;
2124 return $this->msg( $this->mMessagePrefix ?
"{$this->mMessagePrefix}-$key" : $key )->text();
2138 $this->mAction = $action;
2152 if ( $this->mAction !==
false ) {
2153 return $this->mAction;
2156 $articlePath = $this->getConfig()->get( MainConfigNames::ArticlePath );
2162 if ( strpos( $articlePath,
'?' ) !==
false && $this->getMethod() ===
'get' ) {
2163 return $this->getConfig()->get( MainConfigNames::Script );
2166 return $this->
getTitle()->getLocalURL();
2180 $this->mAutocomplete = $autocomplete;
2205 foreach ( $this->mFlatFields as $fieldname => $field ) {
2206 if ( $field->needsJSForHtml5FormValidation() ) {
if(!defined('MW_SETUP_CALLBACK'))
The persistent session ID (if any) loaded at startup.
The simplest way of implementing IContextSource is to hold a RequestContext as a member variable and ...
setContext(IContextSource $context)
static hidden( $name, $value, array $attribs=[])
Convenience function to produce an input element with type=hidden.
static tooltipAndAccesskeyAttribs( $name, array $msgParams=[], $options=null, $localizer=null, $user=null, $config=null, $relevantTitle=null)
Returns the attributes for the tooltip and access key.
A class containing constants representing the names of configuration variables.
The Message class deals with fetching and processing of interface message into a variety of formats.
static newFromSpecifier( $value)
Transform a MessageSpecifier or a primitive value used interchangeably with specifiers (a message key...
Generic operation result class Has warning/error list, boolean status and arbitrary value.
isGood()
Returns whether the operation completed and didn't have any error or warnings.
Generic operation result class Has warning/error list, boolean status and arbitrary value.
Represents a title within MediaWiki.
Interface for objects which can provide a MediaWiki context on request.