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

        $page = new SwatNoteBookPage();
        $page->id = $page->getUniqueId();
        $page_prototype_id = $page->id;

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

        $this->add($page);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $page = $this->getWidget($page_prototype_id, $id);
            $page->title = $title;
        }

        $note_book = new SwatNoteBook($this->id . '_notebook');

        foreach ($this->children as $child_widget) {
            $page = $this->remove($child_widget);
            $note_book->addPage($page);
        }

        $this->add($note_book);
    }
public function init()
    {
        $children = array();
        foreach ($this->children as $child_widget) {
            $children[] = $this->remove($child_widget);
        }

        $page = new SwatNoteBookPage();
        $page->id = $page->getUniqueId();
        $page_prototype_id = $page->id;

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

        $this->add($page);

        parent::init();

        foreach ($this->replicators as $id => $title) {
            $page = $this->getWidget($page_prototype_id, $id);
            $page->title = $title;
        }

        $note_book = new SwatNoteBook($this->id . '_notebook');

        foreach ($this->children as $child_widget) {
            $page = $this->remove($child_widget);
            $note_book->addPage($page);
        }

        $this->add($note_book);
    }
public function init ( ) { $ children = array ( ) ; foreach ( $ this -> children as $ child_widget ) { $ children [ ] = $ this -> remove ( $ child_widget ) ; } $ page = new SwatNoteBookPage ( ) ; $ page -> id = $ page -> getUniqueId ( ) ; $ page_prototype_id = $ page -> id ; foreach ( $ children as $ child_widget ) { $ page -> add ( $ child_widget ) ; } $ this -> add ( $ page ) ; parent :: init ( ) ; foreach ( $ this -> replicators as $ id => $ title ) { $ page = $ this -> getWidget ( $ page_prototype_id , $ id ) ; $ page -> title = $ title ; } $ note_book = new SwatNoteBook ( $ this -> id . '_notebook' ) ; foreach ( $ this -> children as $ child_widget ) { $ page = $ this -> remove ( $ child_widget ) ; $ note_book -> addPage ( $ page ) ; } $ this -> add ( $ note_book ) ; }
Initilizes this replicable notebook page
Initilizes this replicable notebook page