Semantic MediaWiki and related extensions
Public Member Functions | List of all members
SMW\MediaWiki\Hooks\InternalParseBeforeLinks Class Reference
Inheritance diagram for SMW\MediaWiki\Hooks\InternalParseBeforeLinks:
Inheritance graph
[legend]
Collaboration diagram for SMW\MediaWiki\Hooks\InternalParseBeforeLinks:
Collaboration graph
[legend]

Public Member Functions

 __construct (Parser &$parser, $stripState)
 
 process (&$text)
 

Detailed Description

The main task for this hook is to parse and replace the Semantic MediaWiki specific annotation syntax (e.g. [[PropertyA::ValueB]]) with a corresponding text representation (e.g. wikitext link, reference, URL etc.) of the value and the defined property. Structured information is gathered from a parsed text and attached to the ParserOutput for further processing after the parsing has been completed.

Hook: InternalParseBeforeLinks is used to process the expanded wiki code after <nowiki>, HTML-comments, and templates have been treated.

This method will be called before an article is displayed or previewed. For display and preview we strip out the semantic properties and append them at the end of the article.

Note
MW 1.20+ see InternalParseBeforeSanitize
See also
https://www.mediawiki.org/wiki/Manual:Hooks/InternalParseBeforeLinks

GNU GPL v2+

Since
1.9
Author
mwjames

Constructor & Destructor Documentation

◆ __construct()

SMW\MediaWiki\Hooks\InternalParseBeforeLinks::__construct ( Parser &  $parser,
  $stripState 
)
Since
1.9
Parameters
Parser$parser
StripState$stripState

Member Function Documentation

◆ process()

SMW\MediaWiki\Hooks\InternalParseBeforeLinks::process ( $text)
Since
1.9
Parameters
string$text
Returns
true

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

About | General disclaimer | Privacy policy