BlueSpice MediaWiki master
 All Classes Namespaces Files Functions Variables Groups Pages
CoreTagHooks Class Reference

Static Public Member Functions

static register ($parser)
 
static pre ($text, $attribs, $parser)
 
static html ($content, $attributes, $parser)
 
static nowiki ($content, $attributes, $parser)
 
static gallery ($content, $attributes, $parser)
 
static indicator ($content, array $attributes, Parser $parser, PPFrame $frame)
 

Detailed Description

Various tag hooks, registered in Parser::firstCallInit()

Member Function Documentation

static CoreTagHooks::gallery (   $content,
  $attributes,
  $parser 
)
static

Core parser tag hook function for 'gallery'.

Renders a thumbnail list of the given images, with optional captions. Full syntax documented on the wiki:

https://www.mediawiki.org/wiki/Help:Images#Gallery_syntax

Todo:
break Parser::renderImageGallery out here too.
Parameters
string$content
array$attributes
Parser$parser
Returns
string HTML
static CoreTagHooks::html (   $content,
  $attributes,
  $parser 
)
static

Core parser tag hook function for 'html', used only when $wgRawHtml is enabled.

This is potentially unsafe and should be used only in very careful circumstances, as the contents are emitted as raw HTML.

Uses undocumented extended tag hook return values, introduced in r61913.

Parameters
string$content
array$attributes
Parser$parser
Exceptions
MWException
Returns
array|string Output of tag hook
static CoreTagHooks::indicator (   $content,
array  $attributes,
Parser  $parser,
PPFrame  $frame 
)
static

XML-style tag for page status indicators: icons (or short text snippets) usually displayed in the top-right corner of the page, outside of the main content.

Parameters
string$content
array$attributes
Parser$parser
PPFrame$frame
Returns
string
Since
1.25
static CoreTagHooks::nowiki (   $content,
  $attributes,
  $parser 
)
static

Core parser tag hook function for 'nowiki'. Text within this section gets interpreted as a string of text with HTML-compatible character references, and wiki markup within it will not be expanded.

Uses undocumented extended tag hook return values, introduced in r61913.

Parameters
string$content
array$attributes
Parser$parser
Returns
array
static CoreTagHooks::pre (   $text,
  $attribs,
  $parser 
)
static

Core parser tag hook function for 'pre'. Text is treated roughly as 'nowiki' wrapped in an HTML 'pre' tag; valid HTML attributes are passed on.

Parameters
string$text
array$attribs
Parser$parser
Returns
string HTML
static CoreTagHooks::register (   $parser)
static
Parameters
Parser$parser
Returns
void

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