getConfig('type')) { case Entity::TYPE_CALCULATOR: $this->_prepareCalculator(); break; case Entity::TYPE_IMAGES: $this->_prepareHomePageImages(); break; } $this->_postView(); return $this; } protected function _prepareCalculator() { $options = array('prices' => array( 'liteWindow' => Settings::get('calculatorPriceLite'), 'singleWindow' => Settings::get('calculatorPriceSingle'), 'doubleWindow' => Settings::get('calculatorPriceDouble'), 'economy' => Settings::get('calculatorPriceEconomy'), 'premium' => Settings::get('calculatorPricePremium'), 'premiumPlus' => Settings::get('calculatorPricePremiumPlus'), ) ); // $this->_doc->addScript('js/app/simpleBlock/calculator.js'); // $this->_doc->addInitObject('App_SimpleBlock_Calculator', $options); $item['tpl'] = $this->getTemplate('calculator.tpl'); $this->_addItem($item); return $this; } protected function _prepareHomePageImages() { $this->_doc->addCriticalStylesheet('css/thirdpart/fancybox/jquery.fancybox.css'); $this->_doc->addScript('js/fancybox/jquery.fancybox.js'); $this->_doc->addScript('js/app/simpleBlock/home-page-images.js'); $this->_doc->addInitObject('App_SimpleBlock_HomePageImages'); $item['tpl'] = $this->getTemplate('home-page-images.tpl'); $item['list'] = array( Settings::get('HomeImagesOne'), Settings::get('HomeImagesTwo'), Settings::get('HomeImagesThree'), Settings::get('HomeImagesFour'), ); $this->_addItem($item); return $this; } }