◆ getVectorResourceLoaderConfig()
static MediaWiki\Skins\Vector\Hooks::getVectorResourceLoaderConfig |
( |
RL\Context | $context, |
|
|
Config | $config ) |
|
static |
Passes config variables to Vector (modern) ResourceLoader module.
- Parameters
-
RL\Context | $context | |
Config | $config | |
- Returns
- array
◆ getVectorSearchResourceLoaderConfig()
static MediaWiki\Skins\Vector\Hooks::getVectorSearchResourceLoaderConfig |
( |
RL\Context | $context, |
|
|
Config | $config ) |
|
static |
Generates config variables for skins.vector.search Resource Loader module (defined in skin.json).
- Parameters
-
RL\Context | $context | |
Config | $config | |
- Returns
- array<string,mixed>
◆ onGetPreferences()
MediaWiki\Skins\Vector\Hooks::onGetPreferences |
( |
| $user, |
|
|
& | $prefs ) |
Adds the persistent sidebar hidden API preference.
- Parameters
-
User | $user | User whose preferences are being modified. |
array[] | &$prefs | Preferences description array, to be fed to a HTMLForm object. |
◆ onLocalUserCreated()
MediaWiki\Skins\Vector\Hooks::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()
MediaWiki\Skins\Vector\Hooks::onMakeGlobalVariablesScript |
( |
& | $vars, |
|
|
| $out ) |
NOTE: Please use ResourceLoaderGetConfigVars hook instead if possible for adding config to the page.
Adds config variables to JS that depend on current page/request.
Adds a config flag that can disable saving the VectorSidebarVisible user preference when the sidebar menu icon is clicked.
- Parameters
-
array | &$vars | Array of variables to be added into the output. |
OutputPage | $out | OutputPage instance calling the hook |
◆ onOutputPageBodyAttributes()
MediaWiki\Skins\Vector\Hooks::onOutputPageBodyAttributes |
( |
| $out, |
|
|
| $sk, |
|
|
& | $bodyAttrs ) |
Called when OutputPage::headElement is creating the body tag to allow skins and extensions to add attributes they might need to the body of the page.
- Parameters
-
OutputPage | $out | |
Skin | $sk | |
string[] | &$bodyAttrs | |
◆ onRequestContextCreateSkin()
MediaWiki\Skins\Vector\Hooks::onRequestContextCreateSkin |
( |
| $context, |
|
|
& | $skin ) |
Temporary RequestContextCreateSkin hook handler.
Switches to new Vector on certain pages.
- See also
- https://www.mediawiki.org/wiki/Manual:Hooks/RequestContextCreateSkin
- Parameters
-
IContextSource | $context | The RequestContext object the skin is being created for. |
Skin | null | string | &$skin | A variable reference you may set a Skin instance or string key on to override the skin that will be used for the context. |
- Returns
- bool|void
◆ onResourceLoaderSiteModulePages()
MediaWiki\Skins\Vector\Hooks::onResourceLoaderSiteModulePages |
( |
| $skin, |
|
|
& | $pages ) |
Adds MediaWiki:Vector.css as the skin style that controls classic Vector.
- Parameters
-
◆ onResourceLoaderSiteStylesModulePages()
MediaWiki\Skins\Vector\Hooks::onResourceLoaderSiteStylesModulePages |
( |
| $skin, |
|
|
& | $pages ) |
Adds MediaWiki:Vector.css as the skin style that controls classic Vector.
- Parameters
-
◆ onSkinPageReadyConfig()
MediaWiki\Skins\Vector\Hooks::onSkinPageReadyConfig |
( |
RL\Context | $context, |
|
|
array & | $config ) |
SkinPageReadyConfig hook handler.
Replace searchModule provided by skin.
- Since
- 1.35
- Parameters
-
RL\Context | $context | |
mixed[] | &$config | Associative array of configurable options |
- Returns
- void This hook must not abort, it must return no value
◆ onSkinTemplateNavigation()
static MediaWiki\Skins\Vector\Hooks::onSkinTemplateNavigation |
( |
| $sk, |
|
|
& | $content_navigation ) |
|
static |
◆ shouldDisableMaxWidth()
static MediaWiki\Skins\Vector\Hooks::shouldDisableMaxWidth |
( |
array | $options, |
|
|
Title | $title, |
|
|
array | $requestValues ) |
|
static |
Per the $options configuration (for use with $wgVectorMaxWidthOptions) determine whether max-width should be disabled on the page.
For the main page: Check the value of $options['exclude']['mainpage'] For all other pages, the following will happen:
- the array $options['include'] of canonical page names will be checked against the current page. If a page has been listed there, function will return false (max-width will not be disabled) Max width is disabled if: 1) The current namespace is listed in array $options['exclude']['namespaces'] OR 2) A query string parameter matches one of the regex patterns in $exclusions['querystring'].
◆ updateDropdownMenuData()
static MediaWiki\Skins\Vector\Hooks::updateDropdownMenuData |
( |
| $item | ) |
|
|
static |
Updates template data for Vector dropdown menus.
- Parameters
-
array | $item | Menu data to update |
- Returns
- array $item Updated menu data
◆ updateLinkData()
static MediaWiki\Skins\Vector\Hooks::updateLinkData |
( |
| $item | ) |
|
|
static |
Updates template data for Vector link items.
- Parameters
-
array | $item | link data to update |
- Returns
- array $item Updated link data
◆ updateMenuItemData()
static MediaWiki\Skins\Vector\Hooks::updateMenuItemData |
( |
| $item | ) |
|
|
static |
Updates template data for Vector menu items.
- Parameters
-
array | $item | menu item data to update |
- Returns
- array $item Updated menu item data
The documentation for this class was generated from the following file: