WikiLambda
MediaWiki WikiLambda extension
Loading...
Searching...
No Matches
MediaWiki\Extension\WikiLambda\Hooks Class Reference
+ Inheritance diagram for MediaWiki\Extension\WikiLambda\Hooks:
+ Collaboration diagram for MediaWiki\Extension\WikiLambda\Hooks:

Public Member Functions

 onLoadExtensionSchemaUpdates ( $updater)
 

Static Public Member Functions

static registerExtension ()
 
static createInitialContent (DatabaseUpdater $updater, $overwrite=false)
 Installer/Updater callback to create the initial "system" ZObjects on any installation.
 

Static Protected Member Functions

static getDataPath ()
 Return path of data definition JSON files.
 
static insertContentObject ( $updater, $filename, $dependencies, $user, $comment, $overwrite=false, &$inserted=[], $track=[])
 Inserts into the database the ZObject found in a given filename of the data directory.
 

Member Function Documentation

◆ createInitialContent()

static MediaWiki\Extension\WikiLambda\Hooks::createInitialContent ( DatabaseUpdater $updater,
$overwrite = false )
static

Installer/Updater callback to create the initial "system" ZObjects on any installation.

This is a callback so that it runs after the tables have been created/updated.

Parameters
DatabaseUpdater$updater
bool$overwriteIf true, overwrites the content, else skips if present

◆ getDataPath()

static MediaWiki\Extension\WikiLambda\Hooks::getDataPath ( )
staticprotected

Return path of data definition JSON files.

Returns
string

◆ insertContentObject()

static MediaWiki\Extension\WikiLambda\Hooks::insertContentObject ( $updater,
$filename,
$dependencies,
$user,
$comment,
$overwrite = false,
& $inserted = [],
$track = [] )
staticprotected

Inserts into the database the ZObject found in a given filename of the data directory.

First checks whether the ZObject has any dependencies, according to the dependencies.json manifest file, and if so, inserts all the dependencies before trying the current ZObject.

Runs in a static context and so can't be part of the normal code in ZObjectStore.

Parameters
DatabaseUpdater$updater
string$filename
array$dependencies
User$user
string$comment
bool$overwrite
string[]&$inserted
string[]$track
Returns
bool Has successfully inserted the content object
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ onLoadExtensionSchemaUpdates()

MediaWiki\Extension\WikiLambda\Hooks::onLoadExtensionSchemaUpdates ( $updater)
See also
https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates
Parameters
DatabaseUpdater$updaterDatabaseUpdater subclass

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