36 $this->modifiedUser =
$user;
43 if ( $this->modifiedUser ===
null ) {
65 $html = Xml::tags(
'div', [
'id' =>
'preferences' ],
$html );
67 return parent::wrapForm(
$html );
74 $attrs = [
'id' =>
'mw-prefs-restoreprefs' ];
76 if ( !$this->
getModifiedUser()->isAllowedAny(
'editmyprivateinfo',
'editmyoptions' ) ) {
80 $html = parent::getButtons();
85 $linkRenderer = MediaWikiServices::getInstance()->getLinkRenderer();
87 Html::buttonAttributes( $attrs, [
'mw-ui-quiet' ] ) );
89 $html = Xml::tags(
'div', [
'class' =>
'mw-prefs-buttons' ],
$html );
102 foreach ( $this->mFlatFields as $fieldname => $field ) {
104 $info = $field->mParams;
105 $prefix = isset( $info[
'prefix'] ) ? $info[
'prefix'] : $fieldname;
106 foreach ( $field->filterDataForSubmit( $data[$fieldname] ) as $key =>
$value ) {
107 $data[
"$prefix$key"] =
$value;
109 unset( $data[$fieldname] );
121 return $this->
displaySection( $this->mFieldTree,
'',
'mw-prefsection-' );
131 $legend = parent::getLegend( $key );
132 Hooks::run(
'PreferencesGetLegend', [ $this, $key, &$legend ] );
141 return array_keys( array_filter( $this->mFieldTree,
'is_array' ) );
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
getUser()
Get the User object.
design txt This is a brief overview of the new design More thorough and up to date information is available on the documentation wiki at etc Handles the details of getting and saving to the user table of the and dealing with sessions and cookies OutputPage Encapsulates the entire HTML page that will be sent in response to any server request It is used by calling its functions to add text
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
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 after in associative array form before processing starts Return false to skip default processing and return $ret $linkRenderer
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