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->indexes = $this->_widget->indexes;
16  $widget = $this->_view->createWidget([$this->_id,$id],$widget);
17  $format = str_replace($escape . $id . $escape,$widget->render(\Rsi\Record::get($value,$id,$widget->defaultValue),$raw),$format);
18  }
19  return $format;
20  }
21 
22 }
Rsi
Rsi\Fred\Controller\View\Html\Widget\Group
Definition: Group.php:5
Rsi\Fred\Controller\View\Html\Widget
Definition: Char.php:3
Rsi\Fred\Controller\View\Html\Widget\Group\renderInput
renderInput($value, $raw, $attribs=null)
Definition: Group.php:11
Rsi\Fred\Controller\View\Html\Widget\Group\renderHidden
renderHidden($value, $raw)
Definition: Group.php:7