Allows storing and accessing of templates (e.g.
More...
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.
- Copyright
- GPL-2.0-or-later
- Author
- H. Snater media.nosp@m.wiki.nosp@m.@snat.nosp@m.er.c.nosp@m.om
◆ __construct()
Wikibase\View\Template\Template::__construct |
( |
TemplateRegistry |
$templateRegistry, |
|
|
|
$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 | string[] | $key | message key, or array of message keys to try and use the first non-empty message for |
array | $params | Array message parameters |
◆ fetchMessage()
Wikibase\View\Template\Template::fetchMessage |
( |
| ) |
|
|
protected |
Fetch a template from the template store.
- See also
- Message.fetchMessage
- Returns
- string template
◆ render()
Wikibase\View\Template\Template::render |
( |
| ) |
|
◆ $templateRegistry
Wikibase\View\Template\Template::$templateRegistry |
|
protected |
The documentation for this class was generated from the following file: