Swat/SwatReplicableFormField.php
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $field = new SwatFormField();
        $field->id = $field->getUniqueId();
        $prototype_id = $field->id;

        foreach ($children as $child_widget) {
            $field->add($child_widget);
        }

        $this->add($field);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $field = $this->getWidget($prototype_id, $id);
            $field->title = $title;
        }
    }
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $field = new SwatFormField();
        $field->id = $field->getUniqueId();
        $prototype_id = $field->id;

        foreach ($children as $child_widget) {
            $field->add($child_widget);
        }

        $this->add($field);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $field = $this->getWidget($prototype_id, $id);
            $field->title = $title;
        }
    }
public function init ( ) { $ children = array ( ) ; foreach ( $ this -> children as $ child_widget ) { $ children [ ] = $ this -> remove ( $ child_widget ) ; } $ field = new SwatFormField ( ) ; $ field -> id = $ field -> getUniqueId ( ) ; $ prototype_id = $ field -> id ; foreach ( $ children as $ child_widget ) { $ field -> add ( $ child_widget ) ; } $ this -> add ( $ field ) ; parent :: init ( ) ; foreach ( $ this -> replicators as $ id => $ title ) { $ field = $ this -> getWidget ( $ prototype_id , $ id ) ; $ field -> title = $ title ; } }
Initilizes this replicable form field
Initilizes this replicable form field