public function value()
 {
     $value = InputListField::value();
     if (is_array($value)) {
         return $value;
     } else {
         return str::split($value, ',');
     }
 }
Beispiel #2
0
 public function value()
 {
     $value = parent::value();
     if (empty($value)) {
         // get the first key of options
         $options = $this->options();
         if (is_array($options)) {
             reset($options);
             $value = key($options);
         }
     }
     return $value;
 }