38 'require-match' =>
false,
53 $params[
'autocomplete-data-messages'] =
$params[
'autocomplete-messages'];
60 foreach ( $this->mParams[
'autocomplete-data-messages'] as $key =>
$value ) {
61 $key = $this->
msg( $key )->plain();
65 foreach ( $this->mParams[
'autocomplete-data'] as $key =>
$value ) {
69 if ( !
is_array( $this->autocompleteData ) || !$this->autocompleteData ) {
70 throw new MWException(
'HTMLAutoCompleteSelectField called without any autocompletions' );
74 if ( $this->mOptions && !
in_array(
'other', $this->mOptions,
true ) ) {
80 $msg =
wfMessage(
'htmlform-selectorother-other' )->text();
82 $this->mOptions[$msg] =
'other';
87 if (
$request->getCheck( $this->mName ) ) {
88 $val =
$request->getText( $this->mName .
'-select',
'other' );
90 if ( $val ===
'other' ) {
91 $val =
$request->getText( $this->mName );
92 if (
isset( $this->autocompleteData[$val] ) ) {
93 $val = $this->autocompleteData[
$val];
104 $p = parent::validate(
$value, $alldata );
116 }
elseif ( $this->mParams[
'require-match'] ) {
117 return $this->
msg(
'htmlform-select-badoption' );
127 'data-autocomplete' => FormatJson::encode(
array_keys( $this->autocompleteData ) ),
128 ] + parent::getAttributes( $list );
131 $attribs[
'data-hide-if'] = FormatJson::encode(
132 [
'!==', $this->mName .
'-select',
'other' ]
141 $this->mClass = (
array)$this->mClass;
143 $valInSelect =
false;
154 $selected = $valInSelect ?
$value :
'other';
155 $select =
new XmlSelect( $this->mName .
'-select', $this->mID .
'-select', $selected );
157 $select->setAttribute(
'class',
'mw-htmlform-select-or-other' );
159 if ( !empty( $this->mParams[
'disabled'] ) ) {
160 $select->setAttribute(
'disabled',
'disabled' );
163 if (
isset( $this->mParams[
'tabindex'] ) ) {
164 $select->setAttribute(
'tabindex', $this->mParams[
'tabindex'] );
167 $ret = $select->getHTML() .
"<br />\n";
169 $this->mClass[] =
'mw-htmlform-hide-if';
172 if ( $valInSelect ) {
176 if ( $key !==
false ) {
181 $this->mClass[] =
'mw-htmlform-autocomplete';
182 $ret .= parent::getInputHTML( $valInSelect ?
'' :
$value );
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Text field for selecting a value from a large list of possible values, with auto-completion and optio...
getInputOOUI( $value)
Get the OOUI version of this input.
getAttributes(array $list)
Returns the given attributes from the parameters.
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
validate( $value, $alldata)
Override this function to add specific validation checks on the field input.
loadDataFromRequest( $request)
Get the value that this input has been set to from a posted form, or the input's default value if it ...
Class for generating HTML <select> or <datalist> elements.
do that in ParserLimitReportFormat instead use this to modify the parameters of the image all existing parser cache entries will be invalid To avoid you ll need to handle that somehow(e.g. with the RejectParserCacheValue hook) because MediaWiki won 't do it for you. & $defaults also a ContextSource after deleting those rows but within the same transaction you ll probably need to make sure the header is varied on $request
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 & $ret
either a unescaped string or a HtmlArmor object after in associative array form externallinks including delete and has completed for all link tables whether this was an auto creation use $formDescriptor instead default is conds Array Extra conditions for the No matching items in log is displayed if loglist is empty msgKey Array If you want a nice box with a set this to the key of the message First element is the message additional optional elements are parameters for the key that are processed with wfMessage() -> params() ->parseAsBlock() - offset Set to overwrite offset parameter in $wgRequest set to '' to unset offset - wrap String Wrap the message in html(usually something like "<div ...>$1</div>"). - flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException':Called before an exception(or PHP error) is logged. This is meant for integration with external error aggregation services
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
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))