/** * @return array */ public function getVisitorCountry() { if (!isset($this->_country)) { $this->_country = Helper::getUserCountry(); } return $this->_country; }
/** * @return array */ public function getOptions() { $countriesDao = new Countries($this->getServiceLocator()); $countries = $countriesDao->getCountriesList(); $partnerDao = $this->getBookingPartnerDao(); $partners = $partnerDao->getPartnerListForWeb(); $userCountryData = Helper::getUserCountry(); return ['countris' => $countries, 'partners' => $partners, 'userCountryData' => $userCountryData]; }
private function getUserCountry() { $userCountry = Helper::getUserCountry(); return !Helper::isBackofficeUser() && isset($userCountry['country_id']) && $userCountry['country_id'] ? $userCountry['country_id'] : 0; }