FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Group.php
Go to the documentation of this file.
1 <?php
2 
4 
5 class Group extends \Rsi\Fred\Controller\View\Html\Widget{
6 
7  protected function renderHidden($value,$raw){
8  return parent::renderHidden(is_array($value) ? $this->_widget->format($value) : $value,$raw);
9  }
10 
11  protected function renderInput($value,$raw,$attribs = null){
12  $format = str_replace(['[',']'],$escape = \Rsi\Str::random(),$this->_widget->format);
13  $value = $this->_widget->explode($value);
14  foreach($this->_widget->widgets as $id => $widget){
15  $widget = $this->_view->createWidget([$this->_id,$id],$widget);
16  $format = str_replace($escape . $id . $escape,$widget->render(\Rsi\Record::get($value,$id,$widget->defaultValue),$raw),$format);
17  }
18  return $format;
19  }
20 
21 }
renderInput($value, $raw, $attribs=null)
Definition: Group.php:11