36 $this->modifiedUser =
$user;
43 if ( $this->modifiedUser ===
null ) {
65 $html = Xml::tags(
'div', [
'id' =>
'preferences' ],
$html );
67 return parent::wrapForm(
$html );
74 if ( !$this->
getModifiedUser()->isAllowedAny(
'editmyprivateinfo',
'editmyoptions' ) ) {
78 $html = parent::getButtons();
83 $html .=
new OOUI\ButtonWidget( [
85 'id' =>
'mw-prefs-restoreprefs',
86 'label' => $this->
msg(
'restoreprefs' )->
text(),
87 'href' =>
$t->getLinkURL(),
88 'flags' => [
'destructive' ],
92 $html = Xml::tags(
'div', [
'class' =>
'mw-prefs-buttons' ],
$html );
105 foreach ( $this->mFlatFields as $fieldname => $field ) {
107 $info = $field->mParams;
108 $prefix = $info[
'prefix'] ?? $fieldname;
109 foreach ( $field->filterDataForSubmit( $data[$fieldname] ) as $key =>
$value ) {
110 $data[
"$prefix$key"] =
$value;
112 unset( $data[$fieldname] );
123 $wrapper =
new OOUI\PanelLayout( [
125 'scrollable' =>
true,
128 'infusable' =>
false,
129 'classes' => [
'oo-ui-stackLayout oo-ui-indexLayout-stackLayout' ]
131 $layout =
new OOUI\PanelLayout( [
133 'scrollable' =>
true,
134 'infusable' =>
false,
135 'classes' => [
'oo-ui-tabPanelLayout' ]
137 $wrapper->appendContent( $layout );
139 $wrapper = $layout =
new OOUI\PanelLayout( [
143 'infusable' =>
false,
147 $layout->appendContent(
148 new OOUI\FieldsetLayout( [
150 'infusable' =>
false,
153 'content' =>
new OOUI\HtmlSnippet(
$section )
175 'oo-ui-widget oo-ui-widget-enabled oo-ui-optionWidget ' .
176 'oo-ui-tabOptionWidget oo-ui-labelElement' .
177 ( $i === 0 ?
' oo-ui-optionWidget-selected' :
'' )
182 'class' =>
'oo-ui-labelElement-label',
185 'href' =>
'#mw-prefsection-' . $key
191 $fakeTabsHtml = Html::rawElement(
193 [
'class' =>
'oo-ui-layout oo-ui-panelLayout oo-ui-indexLayout-tabPanel' ],
196 [
'class' =>
'oo-ui-widget oo-ui-widget-enabled oo-ui-selectWidget ' .
197 'oo-ui-selectWidget-depressed oo-ui-tabSelectWidget' ],
202 return Html::rawElement(
204 [
'class' =>
'oo-ui-layout oo-ui-panelLayout oo-ui-panelLayout-framed mw-prefs-faketabs' ],
207 [
'class' =>
'oo-ui-layout oo-ui-menuLayout oo-ui-menuLayout-static ' .
208 'oo-ui-menuLayout-top oo-ui-menuLayout-showMenu oo-ui-indexLayout' ],
211 [
'class' =>
'oo-ui-menuLayout-menu' ],
216 [
'class' =>
'oo-ui-menuLayout-content mw-htmlform-autoinfuse-lazy' ],
230 $aliasKey = ( $key ===
'optoutwatchlist' || $key ===
'optoutrc' ) ?
'opt-out' : $key;
231 $legend = parent::getLegend( $aliasKey );
232 Hooks::run(
'PreferencesGetLegend', [ $this, $key, &$legend ] );
241 return array_keys( array_filter( $this->mFieldTree,
'is_array' ) );
This list may contain false positives That usually means there is additional text with links below the first Each row contains links to the first and second as well as the first line of the second redirect text
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
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
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
please add to it if you re going to add events to the MediaWiki code where normally authentication against an external auth plugin would be creating a local account $user