Conditions | 4 |
Paths | 4 |
Total Lines | 14 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
49 | public function getValueDisplay($context='') |
||
50 | { |
||
51 | $json = $this->getValue(); |
||
52 | if (empty($json)) |
||
53 | return neon()->formatter->asJson($this->getValue()); |
||
54 | if ($context==='grid') { |
||
55 | $out = ''; |
||
56 | foreach($json as $image) { |
||
57 | $url = neon()->firefly->getImage($image); |
||
58 | $out .= "<img src='$url' />"; |
||
59 | } |
||
60 | return $out; |
||
61 | } |
||
62 | return neon()->formatter->asJson($this->getValue()); |
||
63 | } |
||
65 | } |