for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace neon\core\form\fields;
use neon\core\helpers\Html;
class ImageMultiple extends Field
{
/**
* @inheritdoc
*/
public $ddsDataType = 'json';
public function getFilterField()
return ['class' => 'neon\\core\\form\\fields\\Text'];
}
public function setValue($value)
if (is_array($value))
$this->_value = $value;
if (is_string($value))
$this->_value = json_decode($value);
public function getData()
if (is_string($this->_value)) {
return json_decode($this->_value);
return $this->_value;
public function getComponentDetails()
return [
'icon' => 'fa fa-image', 'group' => 'Media', 'order' => 80
];
public function getValueDisplay($context='')
$json = $this->getValue();
if (empty($json))
return neon()->formatter->asJson($this->getValue());
if ($context==='grid') {
$out = '';
foreach($json as $image) {
$url = neon()->firefly->getImage($image);
$out .= "<img src='$url' />";
return $out;