Пример #1
0
 /**
  * @inheritdoc
  */
 public function getValue()
 {
     $value = parent::getValue();
     //        if ($value && isset($this->fields['selected'])) {
     //            $value = array_values(ArrayHelper::getColumn($value, $this->fields['selected']));
     //        }
     if (!$value) {
         $value = $this->default;
     }
     return $value;
 }
Пример #2
0
 /**
  * @inheritdoc
  */
 public function build()
 {
     $control = array_merge(parent::build(), ['multiple' => $this->multiple, 'placeholder' => $this->placeholder, 'groups' => $this->renderGroups(), 'elementOptions' => $this->elementOptions, 'plugins' => $this->plugins]);
     return $control;
 }