| Total Complexity | 7 |
| Total Lines | 34 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 8 | class TableHandler |
||
| 9 | { |
||
| 10 | private ?ModelInterface $model = null; |
||
| 11 | private string $tableHtml = ''; |
||
| 12 | |||
| 13 | public function setModel(ModelInterface $model): void |
||
| 16 | } |
||
| 17 | public function setHtml(string $html): void |
||
| 20 | } |
||
| 21 | |||
| 22 | public function addErrors(array $errors): void |
||
| 23 | { |
||
| 24 | if (empty($errors)) { |
||
| 25 | return; |
||
| 26 | } |
||
| 27 | $this->tableHtml = MessageUtils::errorHtml($errors, $this->model) . $this->tableHtml; |
||
|
|
|||
| 28 | } |
||
| 29 | |||
| 30 | public function addSuccessMessages(array $successMessages): void |
||
| 37 | } |
||
| 38 | |||
| 39 | public function getHtml(): string |
||
| 44 |