function initFields($extra=array())
{
parent::initFields($extra);
-
- if ($this->inlines) {
- $this->field_groups[] = array('fields' => array_keys($this->fields));
- }
-
foreach ($this->inlines as $inline) {
$name = $inline->getModelName();
$label = $inline->getLegend();
$this->fields[$name] = $inline->createField($extra);
$this->fields[$name]->label = $label;
-
- $this->field_groups[] = array(
- 'label' => $label,
- 'fields' => array($name),
- );
}
}