|
| __construct (Config $config, PopupsContext $popupsContext, LoggerInterface $logger, UserOptionsManager $userOptionsManager) |
|
| onGetPreferences ( $user, &$prefs) |
| Add options to user Preferences page.
|
|
| onBeforePageDisplay ( $out, $skin) |
| Allows last minute changes to the output page, e.g.
|
|
| onResourceLoaderGetConfigVars (array &$vars, $skin, Config $config) |
| Hook handler for the ResourceLoaderStartUpModule that makes static configuration visible to the frontend.
|
|
| onMakeGlobalVariablesScript (&$vars, $out) |
| Hook handler publishing dynamic configuration that depends on the context, e.g.
|
|
| onUserGetDefaultOptions (&$defaultOptions) |
| Called whenever a user wants to reset their preferences.
|
|
| onLocalUserCreated ( $user, $isAutoCreated) |
| Called one time when initializing a users preferences for a newly created account.
|
|
◆ __construct()
Popups\PopupsHooks::__construct |
( |
Config | $config, |
|
|
PopupsContext | $popupsContext, |
|
|
LoggerInterface | $logger, |
|
|
UserOptionsManager | $userOptionsManager ) |
- Parameters
-
Config | $config | |
PopupsContext | $popupsContext | |
LoggerInterface | $logger | |
UserOptionsManager | $userOptionsManager | |
◆ getCustomPopupTypes()
static Popups\PopupsHooks::getCustomPopupTypes |
( |
| ) |
|
|
static |
Get custom Popups types registered by extensions.
- Returns
- array
◆ onBeforePageDisplay()
Popups\PopupsHooks::onBeforePageDisplay |
( |
| $out, |
|
|
| $skin ) |
Allows last minute changes to the output page, e.g.
adding of CSS or JavaScript by extensions.
- Parameters
-
OutputPage | $out | The Output page object |
Skin | $skin | Skin object that will be used to generate the page |
◆ onGetPreferences()
Popups\PopupsHooks::onGetPreferences |
( |
| $user, |
|
|
& | $prefs ) |
Add options to user Preferences page.
- Parameters
-
User | $user | User whose preferences are being modified |
array[] | &$prefs | Preferences description array, to be fed to a HTMLForm object |
◆ onLocalUserCreated()
Popups\PopupsHooks::onLocalUserCreated |
( |
| $user, |
|
|
| $isAutoCreated ) |
Called one time when initializing a users preferences for a newly created account.
- Parameters
-
User | $user | Newly created user object |
bool | $isAutoCreated | |
◆ onMakeGlobalVariablesScript()
Popups\PopupsHooks::onMakeGlobalVariablesScript |
( |
& | $vars, |
|
|
| $out ) |
Hook handler publishing dynamic configuration that depends on the context, e.g.
the page or the users settings. These variables end in an inline <script> in the documents head.
Variables added:
- ‘wgPopupsReferencePreviews’ - The server's notion of whether or not the reference previews should be enabled. Depending on the general setting done on the wiki.
- ‘wgPopupsConflictsWithNavPopupGadget’ - The server's notion of whether or not the user has enabled conflicting Navigational Popups Gadget.
- ‘wgPopupsConflictsWithRefTooltipsGadget’ - The server's notion of whether or not the user has enabled conflicting Reference Tooltips Gadget.
- Parameters
-
array | &$vars | variables to be added into the output of OutputPage::headElement |
\IContextSource | $out | OutputPage instance calling the hook |
◆ onResourceLoaderGetConfigVars()
Popups\PopupsHooks::onResourceLoaderGetConfigVars |
( |
array & | $vars, |
|
|
| $skin, |
|
|
Config | $config ) |
Hook handler for the ResourceLoaderStartUpModule that makes static configuration visible to the frontend.
These variables end in the only "startup" ResourceLoader module that is loaded before all others.
Dynamic configuration that depends on the context needs to be published via the MakeGlobalVariablesScript hook.
- Parameters
-
array | &$vars | Array of variables to be added into the output of the startup module |
string | $skin | |
Config | $config | |
◆ onUserGetDefaultOptions()
Popups\PopupsHooks::onUserGetDefaultOptions |
( |
& | $defaultOptions | ) |
|
Called whenever a user wants to reset their preferences.
- Parameters
-
The documentation for this class was generated from the following file: