xref: /plugin/combo/ComboStrap/Template/TemplateForComponent.php
  • Home
  • History
  • Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<?php
2
3namespace ComboStrap\Template;
4
5use ComboStrap\TemplateEngine;
6
7class TemplateForComponent
8{
9
10
11
12    private string $templateName;
13
14    public function __construct(string $templateName)
15    {
16        $this->templateName = $templateName;
17    }
18
19    public static function create(string $templateName): TemplateForComponent
20    {
21        return new TemplateForComponent($templateName);
22    }
23
24    public function render(array $data): string
25    {
26        return TemplateEngine::createFromContext()
27            ->renderWebComponent($this->templateName,$data);
28    }
29
30
31}
32

served by {OpenGrok

Last Index Update: Thu Jul 13 10:31:41 UTC 2023

Global DokuWiki Links

  • Download
  • Wiki
  • Forum
  • IRC
  • Bugs
  • Translate
  • Git
  • XRef
  • Code Search
Navigate Window
x
Scopes Window
x
Intelligence window
x
Next >> | << Prev


In current file
  • Highlight
  • Unhighlight
  • Unhighlight all
In project "undefined"
  • Search for definitions of
  • Search for references of
  • Do a full search with
  • Search for file names that contain
On Google
  • Google
Messages Window
x