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

Allows storing and accessing of templates (e.g. More...

+ Collaboration diagram for Wikibase\View\Template\Template:

Public Member Functions

 __construct (TemplateRegistry $templateRegistry, string $key, array $params=[])
 important! note that the Template class does not escape anything.
 
 render ()
 

Private Attributes

TemplateRegistry $templateRegistry
 
string $key
 
array $params
 

Detailed Description

Allows storing and accessing of templates (e.g.

snippets commonly used in server-side HTML generation and client-side JavaScript processing).

This class Represents a template that can contain placeholders just like MediaWiki messages.

Author
H. Snater media.nosp@m.wiki.nosp@m.@snat.nosp@m.er.c.nosp@m.om

Constructor & Destructor Documentation

◆ __construct()

Wikibase\View\Template\Template::__construct ( TemplateRegistry $templateRegistry,
string $key,
array $params = [] )

important! note that the Template class does not escape anything.

be sure to escape your params before using this class!

Parameters
TemplateRegistry$templateRegistry
string$keytemplate key
array$paramsArray template parameters

Member Function Documentation

◆ render()

Wikibase\View\Template\Template::render ( )

Member Data Documentation

◆ $key

string Wikibase\View\Template\Template::$key
private

◆ $params

array Wikibase\View\Template\Template::$params
private

◆ $templateRegistry

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

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