Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function getAutocomplateList($txt, $type){
- $respons = [];
- if($type == 2){
- $service = $this->getServiceLocator()->get('location_service');
- $respons = $service->getLocationByTxt($txt);
- } elseif($type == 3){
- $dao = new \DDD\Dao\Accommodation\Accommodations($this->getServiceLocator(), 'DDD\Domain\Accommodation\TranslationAutocomplete');
- $result = $dao->getAccommodationsForTranlation($txt);
- foreach ($result as $row){
- $respons[] = ['id' => $row->getId(),'name' => $row->getName()];
- }
- }
- return $respons;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement