Beispiel #1
0
 public function setView(IView $aView = null)
 {
     $formerView = $this->view();
     if ($formerView) {
         if ($formerView === $aView) {
             return;
         } else {
             $formerView->removeModelObserver($this);
         }
     }
     parent::setView($aView);
     $aView->addModelObserver($this);
     if ($aView) {
         $this->onModelChanging($aView);
     }
 }
Beispiel #2
0
 public function setView(IView $aView = null)
 {
     parent::setView($aView);
     foreach ($this->widgetIterator() as $aWidget) {
         $aView->addWidget($aWidget);
     }
 }