From: Vincent Vanwaelscappel Date: Thu, 6 Jun 2019 14:28:59 +0000 (+0200) Subject: #2810 X-Git-Url: http://git.cubedesigners.com/?a=commitdiff_plain;h=bd561bc4e86fe26498b3fd7d1e2243f186cb5c5c;p=cubist_cms-back.git #2810 --- diff --git a/src/app/Magic/Fields/SelectFromArray.php b/src/app/Magic/Fields/SelectFromArray.php index ba83fde..23a9b4a 100644 --- a/src/app/Magic/Fields/SelectFromArray.php +++ b/src/app/Magic/Fields/SelectFromArray.php @@ -7,6 +7,7 @@ namespace Cubist\Backpack\app\Magic\Fields; class SelectFromArray extends Field { protected $_adminType = 'select2_from_array'; + protected $_columnType = 'select_from_array'; protected $_databaseType = 'string'; protected $_multiple = false; @@ -14,4 +15,11 @@ class SelectFromArray extends Field { return array_merge(parent::getDefaultAttributes(), ['options' => [], 'allow_null' => false, 'allow_multiples' => $this->_multiple]); } + + public function getColumnData() + { + $res = parent::getColumnData(); + $res['options'] = $this->getAttribute('options'); + return $res; + } }