Пример #1
0
 public static function getFullCityAndCountry(User $user)
 {
     $countryLabel = "";
     if ($user->getCountry()) {
         $country = \Sb\Db\Dao\CountryDao::getInstance()->getCountryByCode($user->getCountry());
         $countryLabel = ArrayHelper::getSafeFromArray($_SESSION, "WPLANG", "fr_FR") != "en_US" ? $country->getLabel_french() : $country->getLabel_english();
         $countryLabel = ucfirst($countryLabel);
     }
     $res = "";
     if ($countryLabel != '' && $user->getCity() != '') {
         $res = sprintf(__("%s, %s", "s1b"), ucfirst($user->getCity()), $countryLabel);
     } elseif ($countryLabel != '') {
         $res = $countryLabel;
     } elseif ($user->getCity() != '') {
         $res = ucfirst($user->getCity());
     }
     return $res;
 }
Пример #2
0
 public function getCountry()
 {
     $this->__load();
     return parent::getCountry();
 }