Go to the documentation of this file.
36 $this->modifiedUser =
$user;
43 if ( $this->modifiedUser ===
null ) {
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
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' ],
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' ) );
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 account $user
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
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
static tags( $element, $attribs, $contents)
Same as Xml::element(), but does not escape contents.
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
usually copyright or history_copyright This message must be in HTML not wikitext if the section is included from a template $section
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as
static rawElement( $element, $attribs=[], $contents='')
Returns an HTML element in a string.
static element( $element, $attribs=[], $contents='')
Identical to rawElement(), but HTML-escapes $contents (like Xml::element()).
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.