SMWHooks Class Reference

List of all members.

Static Public Member Functions

static onSchemaUpdate ($updater=null)
 Schema update to set up the needed database tables.
static onPageSchemasRegistration ()
 TODO.
static addToAdminLinks (ALTree &$admin_links_tree)
 Adds links to Admin Links page.
static onArticleFromTitle (Title &$title, &$article)
 Register special classes for displaying semantic content on Property and Concept pages.
static onParserFirstCallInit (Parser &$parser)
 This hook registers parser functions and hooks to the given parser.
static addPoweredBySMW (&$text, $skin)
 Adds the 'Powered by Semantic MediaWiki' button right next to the default 'Powered by MediaWiki' button at the bottom of every page.
static addSemanticExtensionType (array &$aExtensionTypes)
 Adds the 'semantic' extension type to the type list.
static oldAddSemanticExtensionType (SpecialVersion &$oSpecialVersion, array &$aExtensionTypes)
static onParserTestTables (array &$tables)
 Register tables to be added to temporary tables for parser tests.
static showBrowseLink ($skintemplate)
 Add a link to the toolbox to view the properties of the current page in Special:Browse.


Detailed Description

Definition at line 14 of file SemanticMediaWiki.hooks.php.


Member Function Documentation

static SMWHooks::onSchemaUpdate ( updater = null  )  [static]

Schema update to set up the needed database tables.

See also:
https://www.mediawiki.org/wiki/Manual:Hooks/LoadExtensionSchemaUpdates
Since:
1.7
Parameters:
DatabaseUpdater $updater|null
Returns:
true

Definition at line 26 of file SemanticMediaWiki.hooks.php.

static SMWHooks::onPageSchemasRegistration (  )  [static]

TODO.

Since:
1.7
Returns:
true

Definition at line 45 of file SemanticMediaWiki.hooks.php.

static SMWHooks::addToAdminLinks ( ALTree &$  admin_links_tree  )  [static]

Adds links to Admin Links page.

Since:
1.7
Parameters:
ALTree $admin_links_tree
Returns:
true

Definition at line 59 of file SemanticMediaWiki.hooks.php.

static SMWHooks::onArticleFromTitle ( Title &$  title,
&$  article 
) [static]

Register special classes for displaying semantic content on Property and Concept pages.

Since:
1.7
Parameters:
$title Title
$article Article or null
Returns:
true

Definition at line 109 of file SemanticMediaWiki.hooks.php.

static SMWHooks::onParserFirstCallInit ( Parser &$  parser  )  [static]

This hook registers parser functions and hooks to the given parser.

It is called during SMW initialisation. Note that parser hooks are something different than MW hooks in general, which explains the two-level registration.

Since:
1.7
Parameters:
Parser $parser
Returns:
true

Definition at line 130 of file SemanticMediaWiki.hooks.php.

static SMWHooks::addPoweredBySMW ( &$  text,
skin 
) [static]

Adds the 'Powered by Semantic MediaWiki' button right next to the default 'Powered by MediaWiki' button at the bottom of every page.

This works only with MediaWiki 1.17+. It might make sense to make this configurable via a variable, if some admins don't want it.

Since:
1.7
Parameters:
string $text
Skin $skin
Returns:
true

Definition at line 156 of file SemanticMediaWiki.hooks.php.

References $smwgScriptPath.

static SMWHooks::addSemanticExtensionType ( array &$  aExtensionTypes  )  [static]

Adds the 'semantic' extension type to the type list.

Since:
1.7.1
Parameters:
$aExtensionTypes Array
Returns:
true

Definition at line 173 of file SemanticMediaWiki.hooks.php.

static SMWHooks::oldAddSemanticExtensionType ( SpecialVersion &$  oSpecialVersion,
array &$  aExtensionTypes 
) [static]

See also:
SMWHooks::addSemanticExtensionType
Since:
1.7.1
Parameters:
$oSpecialVersion SpecialVersion
$aExtensionTypes Array
Returns:
true

Definition at line 188 of file SemanticMediaWiki.hooks.php.

static SMWHooks::onParserTestTables ( array &$  tables  )  [static]

Register tables to be added to temporary tables for parser tests.

Todo:
Hard-coding this thwarts the modularity/exchangability of the SMW storage backend. The actual list of required tables depends on the backend implementation and cannot really be fixed here.
Since:
1.7.1
Parameters:
array $tables
Returns:
true

Definition at line 204 of file SemanticMediaWiki.hooks.php.

static SMWHooks::showBrowseLink ( skintemplate  )  [static]

Add a link to the toolbox to view the properties of the current page in Special:Browse.

The links has the CSS id "t-smwbrowselink" so that it can be skinned or hidden with all standard mechanisms (also by individual users with custom CSS).

Since:
1.7.1
Parameters:
$skintemplate 
Returns:
true

Definition at line 228 of file SemanticMediaWiki.hooks.php.

References SMWInfolink::newBrowsingLink().


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

Generated on Sun Mar 18 07:15:43 2012 for Semantic MediaWiki by  doxygen 1.5.6