MediaWiki  1.29.1
CiteHooks Class Reference

Static Public Member Functions

static onContentHandlerDefaultModelFor (Title $title, &$model)
 Convert the content model of a message that is actually JSON to JSON. More...
 
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. More...
 
static onLinksUpdateComplete (LinksUpdate &$linksUpdate)
 Callback for LinksUpdateComplete hook If $wgCiteCacheRawReferencesOnParse is set to false, purges the cache when references are modified. More...
 
static onResourceLoaderGetConfigVars (array &$vars)
 Adds extra variables to the global config. More...
 
static onResourceLoaderRegisterModules (&$resourceLoader)
 Conditionally register resource loader modules that depends on the VisualEditor MediaWiki extension. More...
 
static onResourceLoaderTestModules (array &$testModules, ResourceLoader &$resourceLoader)
 Conditionally register the unit testing module for the ext.cite.visualEditor module only if that module is loaded. More...
 

Detailed Description

Definition at line 11 of file CiteHooks.php.

Member Function Documentation

◆ 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
Returns
bool

Definition at line 21 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 191 of file CiteHooks.php.

References $cache, $linksUpdate, FormatJson\ALL_OK, as, FormatJson\encode(), ObjectCache\getMainWANInstance(), and global.

◆ 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 227 of file CiteHooks.php.

References $cache, $linksUpdate, ObjectCache\getMainWANInstance(), global, and WANObjectCache\MAX_COMMIT_DELAY.

◆ onResourceLoaderGetConfigVars()

static CiteHooks::onResourceLoaderGetConfigVars ( array $vars)
static

Adds extra variables to the global config.

Definition at line 254 of file CiteHooks.php.

References $vars, and ConfigFactory\getDefaultInstance().

◆ onResourceLoaderRegisterModules()

static CiteHooks::onResourceLoaderRegisterModules ( $resourceLoader)
static

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

Parameters
$resourceLoader
Returns
true

Definition at line 80 of file CiteHooks.php.

References $dir, and $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$resourceLoaderThe reference to the resource loader
Returns
true

Definition at line 43 of file CiteHooks.php.

References $resourceLoader, and ContextSource\getConfig().


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