private function getCityDistricts($view, $object) { $locationID = $object->getSettlementID(); if ($locationID != NULL) { $list1 = new RealEstateAgency_Object_SettlementPartList(); $list1->setGlobalData($this->getGlobalData()); $list1->setSettlementId($locationID); $list1->loadBy(); $list2 = $list1->getArray(); $list3 = NULL; if (count($list2)) { $list3 = array_merge(array(0 => array('id' => 0, 'name' => '...')), $list2); } $view->list_of_city_districts = $list3; } }
private function loadData() { $globalData = $this->getGlobalData(); $view = $globalData->getView(); $filter = $this->filter; if (!$filter->isReady()) { return; } $list_3 = new RealEstateAgency_Object_SettlementPartList(); $list_3->setGlobalData($globalData); if (!$filter->getSettlementId()) { throw new Exception('List of settlement parts. Incorrect settlement identifier.'); } $list_3->setSettlementId($filter->getSettlementId()); $list_3->loadBy(); $view->list_of_settlement_parts = $list_3; }
private function secondPage($view) { $view->viewmode = 'secondpage'; if ($this->location_id != NULL) { $view->location_id = $this->location_id; } if ($this->location_text != NULL) { $view->location_text = $this->location_text; } if ($this->location_id != NULL) { $list1 = new RealEstateAgency_Object_SettlementPartList(); $list1->setGlobalData($this->getGlobalData()); $list1->setSettlementId($this->location_id); $list1->loadBy(); $list2 = $list1->getArray(); $list3 = NULL; if (count($list2)) { $list3 = array_merge(array(0 => array('id' => 0, 'name' => '...')), $list2); } $view->list_of_city_districts = $list3; } }