Total Complexity | 5 |
Total Lines | 57 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
19 | class ViewStatic extends ViewBase |
||
20 | { |
||
21 | |||
22 | /** |
||
23 | * Block name |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | private $blockName = ''; |
||
28 | |||
29 | /** |
||
30 | * Constructor |
||
31 | * |
||
32 | * @param HtmlTemplate $template |
||
33 | * template |
||
34 | * @param string $blockName |
||
35 | * View's block name to be rendered |
||
36 | */ |
||
37 | public function __construct(HtmlTemplate $template, string $blockName = '') |
||
38 | { |
||
39 | parent::__construct($template); |
||
40 | |||
41 | $this->blockName = $blockName; |
||
42 | } |
||
43 | |||
44 | /** |
||
45 | * Method renders content from view |
||
46 | * |
||
47 | * @param string $blockName |
||
48 | * name of the block to be rendered |
||
49 | * @return string Generated content |
||
50 | */ |
||
51 | public function render(string $blockName = ''): string |
||
66 | } |
||
67 | |||
68 | /** |
||
69 | * Method returns view name |
||
70 | * |
||
71 | * @return string view name |
||
72 | */ |
||
73 | public function getViewName(): string |
||
76 | } |
||
77 | } |
||
78 |