| Conditions | 4 |
| Paths | 4 |
| Total Lines | 15 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 20 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 34 | public function getValueDisplay($context='') |
||
| 35 | { |
||
| 36 | $json = $this->getValue(); |
||
| 37 | if (empty($json)) |
||
| 38 | return neon()->formatter->asJson($this->getValue()); |
||
| 39 | if ($context==='grid') { |
||
| 40 | $out = ''; |
||
| 41 | $images = json_decode($json); |
||
| 42 | foreach($images as $image) { |
||
| 43 | $url = neon()->firefly->getImage($image); |
||
| 44 | $out .= "<img src='$url' />"; |
||
| 45 | } |
||
| 46 | return $out; |
||
| 47 | } |
||
| 48 | return neon()->formatter->asJson($this->getValue()); |
||
| 49 | } |
||
| 51 |