TableRow::fillInputs()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 2
c 0
b 0
f 0
dl 0
loc 4
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 TableRow extends ATemplate
11
{
12
    use TAppend;
13
    use TFile;
14
15
    protected function templatePath(): string
16
    {
17
        return __DIR__ . '/../../shared-templates/table-row.html';
18
    }
19
20
    protected function fillInputs(): void
21
    {
22
        $this->addInput('{ROW_STYLE}');
23
        $this->addInput('{ROW_CONTENT}');
24
    }
25
26
    public function addCell(string $cellContent): self
27
    {
28
        $this->appendContent('{ROW_CONTENT}', $cellContent);
29
        return $this;
30
    }
31
32
    public function setData(string $rowStyle = ''): self
33
    {
34
        $this->updateItem('{ROW_STYLE}', $rowStyle);
35
        $this->updateItem('{ROW_CONTENT}', '');
36
        return $this;
37
    }
38
}
39