8 $options = $this->_widget->options;
9 $available = $selected = [];
10 foreach($options as $key => $descr)
if(!in_array($key,$value ?: [])) $available[$key] = $descr;
11 if($value)
foreach($value as $key)
if(array_key_exists($key,$options)) $selected[$key] = $options[$key];
12 return $this->html->div(
13 $this->html->fieldset(
14 ($available ? $this->html->input(null,$attribs,
'checkbox',$this->_name,$available) : null),
15 [
'class' =>
'fred-available']
17 $this->html->div(null,null,
'fred-actions') .
18 $this->html->fieldset(
19 ($selected ? $this->html->input($value,$attribs,
'checkbox',$this->_name,$selected) : null),
20 [
'class' =>
'fred-selected']
28 $content = $this->
renderHidden(json_encode($value),$raw);
29 $options = $this->_widget->options;
30 if($value)
foreach($value as $key)
if(array_key_exists($key,$options)) $content .= $this->html->_div($options[$key],null,
'value');
31 return $this->
container($content,
'minimal');