Esempio n. 1
0
 /**
  * Sets self::$_aCollectedComponentNames to null, as views and widgets
  * controllers loads different components and calls parent::init()
  */
 public function init()
 {
     self::$_aCollectedComponentNames = null;
     if (!empty($this->_aComponentNames)) {
         foreach ($this->_aComponentNames as $sComponentName => $sCompCache) {
             $oActTopView = $this->getConfig()->getTopActiveView();
             if ($oActTopView) {
                 $this->_oaComponents[$sComponentName] = $oActTopView->getComponent($sComponentName);
                 if (!isset($this->_oaComponents[$sComponentName])) {
                     $this->_blLoadComponents = true;
                     break;
                 } else {
                     $this->_oaComponents[$sComponentName]->setParent($this);
                 }
             }
         }
     }
     parent::init();
 }