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

        $disclosure = new SwatDisclosure();
        $disclosure->id = $disclosure->getUniqueId();
        $prototype_id = $disclosure->id;

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

        $this->add($disclosure);

        parent::init();

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

        $disclosure = new SwatDisclosure();
        $disclosure->id = $disclosure->getUniqueId();
        $prototype_id = $disclosure->id;

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

        $this->add($disclosure);

        parent::init();

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