]> _ Git - cubist_cms-back.git/commitdiff
#2810
authorVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 6 Jun 2019 14:28:59 +0000 (16:28 +0200)
committerVincent Vanwaelscappel <vincent@cubedesigners.com>
Thu, 6 Jun 2019 14:28:59 +0000 (16:28 +0200)
src/app/Magic/Fields/SelectFromArray.php

index ba83fdeb2e4a9d3c1dc31ca48904fc693c7c7d9a..23a9b4a0230f1c12d29df40c7046f11612721246 100644 (file)
@@ -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;
+    }
 }