MediaWiki REL1_34
CiteHooks Class Reference

Static Public Member Functions

static onAPIQuerySiteInfoGeneralInfo (ApiQuerySiteInfo $api, array &$data)
 Hook: APIQuerySiteInfoGeneralInfo.
 
static onContentHandlerDefaultModelFor (Title $title, &$model)
 Convert the content model of a message that is actually JSON to JSON.
 
static onLinksUpdate (LinksUpdate $linksUpdate)
 Callback for LinksUpdate hook Post-output processing of references property, for proper db storage Deferred to avoid performance overhead when outputting the page.
 
static onLinksUpdateComplete (LinksUpdate $linksUpdate)
 Callback for LinksUpdateComplete hook If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache when references are modified.
 
static onResourceLoaderGetConfigVars (array &$vars)
 Adds extra variables to the global config.
 
static onResourceLoaderRegisterModules (ResourceLoader $resourceLoader)
 Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.
 
static onResourceLoaderTestModules (array &$testModules, ResourceLoader $resourceLoader)
 Conditionally register the unit testing module for the ext.cite.visualEditor module only if that module is loaded.
 

Detailed Description

Definition at line 9 of file CiteHooks.php.

Member Function Documentation

◆ onAPIQuerySiteInfoGeneralInfo()

static CiteHooks::onAPIQuerySiteInfoGeneralInfo ( ApiQuerySiteInfo $api,
array & $data )
static

Hook: APIQuerySiteInfoGeneralInfo.

Expose configs via action=query&meta=siteinfo

Parameters
ApiQuerySiteInfo$api
array&$data

Definition at line 282 of file CiteHooks.php.

◆ onContentHandlerDefaultModelFor()

static CiteHooks::onContentHandlerDefaultModelFor ( Title $title,
& $model )
static

Convert the content model of a message that is actually JSON to JSON.

This only affects validation and UI when saving and editing, not loading the content.

Parameters
Title$title
string&$model

Definition at line 19 of file CiteHooks.php.

References $title, CONTENT_MODEL_JSON, and NS_MEDIAWIKI.

◆ onLinksUpdate()

static CiteHooks::onLinksUpdate ( LinksUpdate $linksUpdate)
static

Callback for LinksUpdate hook Post-output processing of references property, for proper db storage Deferred to avoid performance overhead when outputting the page.

Parameters
LinksUpdate$linksUpdate

Definition at line 204 of file CiteHooks.php.

References $cache, Cite\CACHE_DURATION_ONPARSE, Cite\EXT_DATA_KEY, LinksUpdate\getParserOutput(), LinksUpdate\getTitle(), and Cite\MAX_STORAGE_LENGTH.

◆ onLinksUpdateComplete()

static CiteHooks::onLinksUpdateComplete ( LinksUpdate $linksUpdate)
static

Callback for LinksUpdateComplete hook If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache when references are modified.

Parameters
LinksUpdate$linksUpdate

Definition at line 240 of file CiteHooks.php.

References $cache, Cite\EXT_DATA_KEY, LinksUpdate\getAddedProperties(), LinksUpdate\getRemovedProperties(), and LinksUpdate\getTitle().

◆ onResourceLoaderGetConfigVars()

static CiteHooks::onResourceLoaderGetConfigVars ( array & $vars)
static

Adds extra variables to the global config.

Parameters
array&$vars

Definition at line 268 of file CiteHooks.php.

◆ onResourceLoaderRegisterModules()

static CiteHooks::onResourceLoaderRegisterModules ( ResourceLoader $resourceLoader)
static

Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension.

Parameters
ResourceLoader$resourceLoader

Definition at line 73 of file CiteHooks.php.

References $resourceLoader.

◆ onResourceLoaderTestModules()

static CiteHooks::onResourceLoaderTestModules ( array & $testModules,
ResourceLoader $resourceLoader )
static

Conditionally register the unit testing module for the ext.cite.visualEditor module only if that module is loaded.

Parameters
array&$testModulesThe array of registered test modules
ResourceLoader$resourceLoader

Definition at line 38 of file CiteHooks.php.

References $resourceLoader.


The documentation for this class was generated from the following file: