21 $usersArray = explode(
"\n",
$value );
23 $usersArray = array_values( array_filter( $usersArray,
function (
$username ) {
27 return implode(
"\n", $usersArray );
31 if ( !$this->mParams[
'exists'] ) {
40 $usersArray = explode(
"\n",
$value );
42 $result = parent::validate(
$username, $alldata );
43 if ( $result !==
true ) {
52 $this->mParent->getOutput()->enableOOUI();
59 if ( isset( $this->mParams[
'id'] ) ) {
60 $params[
'id'] = $this->mParams[
'id'];
63 if ( isset( $this->mParams[
'disabled'] ) ) {
64 $params[
'disabled'] = $this->mParams[
'disabled'];
67 if ( isset( $this->mParams[
'default'] ) ) {
68 $params[
'default'] = $this->mParams[
'default'];
71 if ( isset( $this->mParams[
'placeholder'] ) ) {
72 $params[
'placeholder'] = $this->mParams[
'placeholder'];
74 $params[
'placeholder'] = $this->
msg(
'mw-widgets-usersmultiselect-placeholder' )->plain();
77 if ( !is_null(
$value ) ) {
84 $params[
'classes'] = [
'mw-htmlform-field-autoinfuse' ];
86 $widget->setAttributes( [
'data-mw-modules' => implode(
',', $this->
getOOUIModules() ) ] );
96 return [
'mediawiki.widgets.UsersMultiselectWidget' ];
Implements a text input field for user names.
Implements a tag multiselect input field for user names.
loadDataFromRequest( $request)
Get the value that this input has been set to from a posted form, or the input's default value if it ...
getInputHTML( $value)
This function must be implemented to return the HTML to generate the input object itself.
getOOUIModules()
Get the list of extra ResourceLoader modules which must be loaded client-side before it's possible to...
shouldInfuseOOUI()
Whether the field should be automatically infused.
validate( $value, $alldata)
Override this function to add specific validation checks on the field input.
getInputOOUI( $value)
Same as getInputHTML, but returns an OOUI object.
namespace being checked & $result
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
this hook is for auditing only or null if authentication failed before getting that far $username