TableCell::templatePath()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 1
c 0
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
namespace kalanis\kw_table\output_kw\Html;
4
5
6
use kalanis\kw_templates\ATemplate;
7
use kalanis\kw_templates\Template\TFile;
8
9
10
class TableCell extends ATemplate
11
{
12
    use TFile;
13
14
    protected function templatePath(): string
15
    {
16
        return __DIR__ . '/../../shared-templates/table-cell.html';
17
    }
18
19
    protected function fillInputs(): void
20
    {
21
        $this->addInput('{CELL_CONTENT}');
22
        $this->addInput('{CELL_STYLE}');
23
    }
24
25
    public function setData(string $cellContent, string $cellStyle = ''): self
26
    {
27
        $this->updateItem('{CELL_CONTENT}', $cellContent);
28
        $this->updateItem('{CELL_STYLE}', $cellStyle);
29
        return $this;
30
    }
31
}
32