9 $options = $group_options = [];
10 foreach($this->
options($value) as $key => $label){
11 if(count($label = explode($this->_widget->groupDelimiter,$label)) == 1) array_unshift($label,null);
12 if($label[0] != $group){
13 if($group_options) $options[$group] = $group_options;
17 if($group) $group_options[$key] = $label[1];
18 else $options[$key] = $label[1];
20 if($group_options) $options[$group] = $group_options;
21 return $this->html->select(
23 array_merge($this->
attribs(),$attribs ?: [],$this->_widget->multi ? [
'multiple' =>
true] : []),
26 $this->_name . ($this->_widget->multi ?
'[]' :
'')