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 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 = '';
$images = json_decode($json);
foreach($images as $image) {
$url = neon()->firefly->getImage($image);
$out .= "<img src='$url' />";
return $out;