/** * @param $apartmentId * @return bool */ public function getApartmentReceptionKeyInstructionTextline($apartmentId) { try { $apartmentDao = new \DDD\Dao\Accommodation\Accommodations($this->getServiceLocator()); $textlines = $apartmentDao->getApartmentReceptionEntryTextline($apartmentId); if (!$textlines['en_text']) { return false; } return $textlines['en_text']; } catch (\Exception $e) { return false; } }
public function getAutocomplateList($txt, $type) { $respons = []; if ($type == 2) { $service = $this->getServiceLocator()->get('service_location'); $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; }