1) { $this->assign('LANGUAGES', $list); } $this->_setSearchParams(); $this->_initSideBlockContent(); return $this; } protected function _setSearchParams() { $this->addScript('js/defaultHint.js', array(), 'defaultHint'); $params = array( 'elements' => array(array('selector' => '#search-text', 'hint' => 'Search', 'required' => false)) ); $this->addInitFunction ('$().defaultHint', array($params)); return $this; } public function getMenu() { if (null === $this->_content['menu']) { $this->_content['menu'] = Qs_SiteMap::getMenu(); foreach (array_keys($this->_content['menu']) as $key) { switch ($this->_content['menu'][$key]['id']) { case self::PRODUCT_PAGE_ID: $this->_prepareProductMenu($this->_content['menu'][$key]); break 2; default: break; } } } return $this->_content['menu']; } protected function _prepareProductMenu(&$item) { $productObj = new App_Product_Obj(); $item['menuType'] = 'products'; $item['sub']['utilityPole'] = $productObj->getPoleMenuProducts(); $item['sub']['other'] = $productObj->getPoleMenuProducts('other'); $item['sub']['productLink'] = Qs_SiteMap::find(null, array('type' => 'Product_'), null, 'url'); return $this; } protected function _initSideBlockContent() { if (class_exists('App_SideBlock_View') && 'n' == $this->getOption('system')) { $view = new App_SideBlock_View(); $view->setDoc($this); $view->exec(); } return $this; } }