Go to the documentation of this file.
36 $this->modifiedUser =
$user;
43 if ( $this->modifiedUser ===
null ) {
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();
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' ) );
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
static tags( $element, $attribs=null, $contents)
Same as Xml::element(), but does not escape contents.
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
msg( $key)
Get a Message object with context set Parameters are the same as wfMessage()
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
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
getUser()
Get the User object.
static buttonAttributes(array $attrs, array $modifiers=[])
Modifies a set of attributes meant for button elements and apply a set of default attributes when $wg...
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
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
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 MediaWikiServices
static run( $event, array $args=[], $deprecatedVersion=null)
Call hook functions defined in Hooks::register and $wgHooks.