Conditions | 6 |
Paths | 10 |
Total Lines | 13 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
12 | public function getCellContent($entity) |
||
13 | { |
||
14 | if (is_callable($this->value)) { |
||
15 | $result = call_user_func_array($this->value, [$entity]); |
||
16 | } elseif ($this->value !== null) { |
||
17 | $result = $this->value ? $this->trueValue : $this->falseValue; |
||
18 | } else { |
||
19 | |||
20 | $result = $entity->{$this->attribute} |
||
21 | ? $this->trueValue |
||
22 | : $this->falseValue; |
||
23 | } |
||
24 | return $this->format == 'html' ? $result : htmlspecialchars($result); |
||
25 | } |
||
59 |