1) { $this->assign('LANGUAGES', $list); } $this->_setSearchParams(); $this->_initTopImage(); $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; } protected function _initTopImage() { $options = $this->getOptions(); if (empty($options['image']) && $options['idParent'] != 0) { $page = App_Cms_Obj::getInstance()->getPageById($options['idParent']); $options['image'] = $page['image']; } $this->assign('headerImage', $options['image']); 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::MAP_PAGE_ID: $list = $this->_content['menu'][$key]['sub']; foreach (array_keys($list) as $subKey) { if ($list[$subKey]['id'] == self::LAND_MANAGEMENT_PAGE_ID) { $manageList = &$list[$subKey]['sub']; foreach (array_keys($manageList) as $subManageKey) { if ($manageList[$subManageKey]['id'] == self::PRIVATE_LANDOWNERS_FAQ_PAGE_ID) { $this->_prepareFaq($manageList[$subManageKey], App_Faq_View::PRIVATE_LANDOWNERS_FAQ_ALIAS); } } } } default: break; } } } return $this->_content['menu']; } protected function _prepareFaq(&$item, $type = null) { $type = $type ? App_Faq_View::PRIVATE_LANDOWNERS_FAQ_ID : App_Faq_View::GENERAL_LANDOWNERS_FAQ_ID; $item['redirectAlias'] = null; $item['url'] = Qs_SiteMap::find(null, array('type' => 'Faq_'), null, 'url') . '/' . $type; 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; } }