Пример #1
0
 protected function _setRequiredParamsToView($view)
 {
     //$this->_helper->viewRenderer->setNoRender();
     $location_id = $this->_getParam('locationid');
     $view->location = new Location($location_id);
     $view->paramsHolder = $view->location->toStdClass();
     //$this->view->paramsHolder = $this->view->location->mergeToAnotherClass($this->view->paramsHolder);
     $view->paramsHolder->locationid = $location_id;
     // Get all category ids.
     $view->paramsHolder->query = Tag::myUrlDecode($this->_getParam('query'));
     $view->paramsHolder->cat1 = Tag::myUrlDecode($this->_getParam('cat1'));
     $view->paramsHolder->cat2 = Tag::myUrlDecode($this->_getParam('cat2'));
     $view->paramsHolder->cat3 = Tag::myUrlDecode($this->_getParam('cat3'));
     $view->paramsHolder->cat4 = Tag::myUrlDecode($this->_getParam('cat4'));
     $view->paramsHolder->cat5 = Tag::myUrlDecode($this->_getParam('cat5'));
     // Get all category names  (only for display)
     $view->paramsHolder->cat1name = Tag::myUrlDecode($this->_getParam('cat1name'));
     $view->paramsHolder->cat2name = Tag::myUrlDecode($this->_getParam('cat2name'));
     $view->paramsHolder->cat3name = Tag::myUrlDecode($this->_getParam('cat3name'));
     $view->paramsHolder->cat4name = Tag::myUrlDecode($this->_getParam('cat4name'));
     $view->paramsHolder->cat5name = Tag::myUrlDecode($this->_getParam('cat5name'));
     $registry = Zend_Registry::getInstance();
     $config = $registry->get('CONFIG');
     $view->limit = $config->search->pagelimit;
     $view->offset = $this->_getParam('page');
     if (empty($view->offset)) {
         $view->offset = 0;
     } else {
         $view->offset = ($this->view->offset - 1) * $view->limit;
     }
     $view->router = Common::getRouteName();
     return $view;
 }
Пример #2
0
 protected function setRequiredParamsToMakeContentHeader()
 {
     // Used by content header.
     // Using homepage template.
     Hotspot_Plugin_ViewSetup::setUpSiteTemplate(Hotspot_Plugin_ViewSetup::FRONTENDVIEW);
     //$this->_helper->viewRenderer->setNoRender();
     $this->view->paramsHolder = new StdClass();
     $this->view->location = new Location(Tag::myUrlDecode($this->_getParam('city')), Tag::myUrlDecode($this->_getParam('state')), Tag::myUrlDecode($this->_getParam('country')), Tag::myUrlDecode($this->_getParam('region')));
     $this->view->paramsHolder = $this->view->location->mergeToAnotherClass($this->view->paramsHolder);
     $this->view->paramsHolder->query = Tag::myUrlDecode($this->_getParam('query'));
     $this->view->paramsHolder->cat1 = Tag::myUrlDecode($this->_getParam('cat1'));
     $this->view->paramsHolder->cat2 = Tag::myUrlDecode($this->_getParam('cat2'));
     $this->view->paramsHolder->cat3 = Tag::myUrlDecode($this->_getParam('cat3'));
     $this->view->paramsHolder->cat4 = Tag::myUrlDecode($this->_getParam('cat4'));
     $this->view->paramsHolder->cat5 = Tag::myUrlDecode($this->_getParam('cat5'));
     $registry = Zend_Registry::getInstance();
     $config = $registry->get('CONFIG');
     $this->view->limit = $config->search->pagelimit;
     $this->view->offset = $this->_getParam('page');
     if (empty($this->view->offset)) {
         $this->view->offset = 0;
     } else {
         $this->view->offset = ($this->view->offset - 1) * 10;
     }
     $this->view->router = Common::getRouteName();
 }
Пример #3
0
 protected function _setRequiredParamsToView($view)
 {
     $view = parent::_setRequiredParamsToView($view);
     $view->paramsHolder->headingid = Tag::myUrlDecode($this->_getParam('headingid'));
     $view->paramsHolder->headingid = $view->paramsHolder->headingid ? $view->paramsHolder->headingid : $this->_cat1All;
     return $view;
 }
Пример #4
0
 protected function _setRequiredParamsToView($view)
 {
     $view = parent::_setRequiredParamsToView($view);
     $view->paramsHolder->min = Tag::myUrlDecode($this->_getParam('min'));
     $view->paramsHolder->max = Tag::myUrlDecode($this->_getParam('max'));
     //$view->paramsHolder->cat2 = ($view->paramsHolder->cat2)?($view->paramsHolder->cat2):630;
     return $view;
 }
Пример #5
0
 protected function _setRequiredParamsToView($view)
 {
     $view = parent::_setRequiredParamsToView($view);
     $view->paramsHolder->bed = Tag::myUrlDecode($this->_getParam('bed'));
     $view->paramsHolder->cars = Tag::myUrlDecode($this->_getParam('cars'));
     $view->paramsHolder->bath = Tag::myUrlDecode($this->_getParam('bath'));
     $view->paramsHolder->min = Tag::myUrlDecode($this->_getParam('min'));
     $view->paramsHolder->max = Tag::myUrlDecode($this->_getParam('max'));
     $view->paramsHolder->cat2 = $view->paramsHolder->cat2 ? $view->paramsHolder->cat2 : 630;
     return $view;
 }