Wikibase
MediaWiki Wikibase extension
Loading...
Searching...
No Matches
Wikibase\View\Template\TemplateFactory Class Reference

Public Member Functions

 __construct (TemplateRegistry $templateRegistry)
 
 getTemplates ()
 
 render ( $key,... $params)
 Shorthand function to retrieve a template filled with the specified parameters.
 

Static Public Member Functions

static getDefaultInstance ()
 

Private Attributes

 $templateRegistry
 

Static Private Attributes

static $instance
 

Detailed Description

Author
Adrian Heine adria.nosp@m.n.he.nosp@m.ine@w.nosp@m.ikim.nosp@m.edia..nosp@m.de
Thiemo Kreuz

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\Template\TemplateFactory::__construct ( TemplateRegistry $templateRegistry)

Member Function Documentation

◆ getDefaultInstance()

static Wikibase\View\Template\TemplateFactory::getDefaultInstance ( )
static

◆ getTemplates()

Wikibase\View\Template\TemplateFactory::getTemplates ( )
Returns
string[] Array containing all raw template strings.

◆ render()

Wikibase\View\Template\TemplateFactory::render ( $key,
$params )

Shorthand function to retrieve a template filled with the specified parameters.

important! note that the Template class does not escape anything. be sure to escape your params before using this function!

Parameters
string$keytemplate key Varargs: normal template parameters
string|array|null...$params
Returns
string

Member Data Documentation

◆ $instance

Wikibase\View\Template\TemplateFactory::$instance
staticprivate

◆ $templateRegistry

Wikibase\View\Template\TemplateFactory::$templateRegistry
private

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