5 class Group extends \Rsi\Fred\Controller\Widget{
15 return array_merge(parent::clientConfig(),[self::CLASS_NAME => get_class()]);
20 foreach($this->widgets as $id => $widget) $result[$id] = $widget->convert($value[$id]);
26 foreach($this->widgets as $id => $widget) $result[$id] = $widget->clientConvert($value[$id]);
31 return $this->valueGlue ? implode($this->valueGlue,$value) : $value;
38 (count($parts =
explode($this->valueGlue,$value)) == count($this->widgets))
39 ) $value = array_combine(array_keys($this->widgets),$parts);
44 if(!is_array($value = $this->
explode($value)))
return $value;
45 $format = $this->format;
46 foreach($this->widgets as $id => $widget) $format = str_replace(
"[$id]",$widget->format($value[$id]),$format);
52 foreach($this->widgets as $id => $widget) $result[$id] = \Rsi\Record::get($value,$id);
57 if(array_key_exists($widget_id = array_shift($id),$this->widgets)) $this->widgets[$widget_id]->execute($id);
58 else parent::executeChild($id);
62 foreach($this->widgets as $id => $widget){
64 if($widget->check($value[$id] ??
null,$index))
return false;
70 if(!$this->_format) $this->_format =
'[' . implode(
'] [',array_keys($this->widgets)) .
']';