Пример #1
0
 public static function apTypes()
 {
     $result = Apartment::getApTypes();
     if (Yii::app()->theme->name == 'atlas') {
         $types = array(0 => Yii::t('common', 'Type of listing'));
     } else {
         $types = array(0 => Yii::t('common', 'Please select'));
     }
     if (param('useTypeSale', 1)) {
         if (in_array(Apartment::PRICE_SALE, $result)) {
             $types[Apartment::PRICE_SALE] = utf8_ucfirst(tt('Sale', 'apartments'));
         }
     }
     if (param('useTypeBuy', 1)) {
         if (in_array(Apartment::PRICE_BUY, $result)) {
             $types[Apartment::PRICE_BUY] = utf8_ucfirst(tt('Buy a', 'apartments'));
         }
     }
     if (param('useTypeRenting', 1)) {
         if (in_array(Apartment::PRICE_RENTING, $result)) {
             $types[Apartment::PRICE_RENTING] = utf8_ucfirst(tt('Rent a', 'apartments'));
         }
     }
     if (param('useTypeChange', 1)) {
         if (in_array(Apartment::PRICE_CHANGE, $result)) {
             $types[Apartment::PRICE_CHANGE] = utf8_ucfirst(tt('Exchange', 'apartments'));
         }
     }
     if (param('useTypeRentDay', 1)) {
         if (in_array(Apartment::PRICE_PER_DAY, $result)) {
             $types[Apartment::PRICE_PER_DAY] = utf8_ucfirst(tc('rent by the day'));
         }
     }
     if (param('useTypeRentHour', 1)) {
         if (in_array(Apartment::PRICE_PER_HOUR, $result)) {
             $types[Apartment::PRICE_PER_HOUR] = utf8_ucfirst(tc('rent by the hour'));
         }
     }
     if (param('useTypeRentMonth', 1)) {
         if (in_array(Apartment::PRICE_PER_MONTH, $result)) {
             $types[Apartment::PRICE_PER_MONTH] = utf8_ucfirst(tc('rent by the month'));
         }
     }
     if (param('useTypeRentWeek', 1)) {
         if (in_array(Apartment::PRICE_PER_WEEK, $result)) {
             $types[Apartment::PRICE_PER_WEEK] = utf8_ucfirst(tc('rent by the week'));
         }
     }
     $return['propertyType'] = $types;
     if (issetModule('selecttoslider') && param('usePriceSlider') == 1) {
         $return['currencyTitle'] = array(Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':');
     } else {
         $return['currencyTitle'] = array(Yii::t('common', 'Payment to'), Yii::t('common', 'Payment to'), Yii::t('common', 'Fee up to'), Yii::t('common', 'Fee up to'), Yii::t('common', 'Fee up to'), Yii::t('common', 'Fee up to'));
     }
     return $return;
 }
Пример #2
0
 public static function apTypes()
 {
     $result = Apartment::getApTypes();
     $types = array(0 => Yii::t('common', 'Please select'));
     if (param('useTypeSale', 1)) {
         if (in_array(Apartment::PRICE_SALE, $result)) {
             $types[Apartment::PRICE_SALE] = tt('Sale', 'apartments');
         }
     }
     if (param('useTypeBuy', 1)) {
         if (in_array(Apartment::PRICE_BUY, $result)) {
             $types[Apartment::PRICE_BUY] = tt('Buy a', 'apartments');
         }
     }
     if (param('useTypeRenting', 1)) {
         if (in_array(Apartment::PRICE_RENTING, $result)) {
             $types[Apartment::PRICE_RENTING] = tt('Rent a', 'apartments');
         }
     }
     if (param('useTypeChange', 1)) {
         if (in_array(Apartment::PRICE_CHANGE, $result)) {
             $types[Apartment::PRICE_CHANGE] = tt('Exchange', 'apartments');
         }
     }
     if (param('useTypeMortgage', 1)) {
         if (in_array(Apartment::PRICE_MORTGAGE, $result)) {
             $types[Apartment::PRICE_MORTGAGE] = tt('Mortgage', 'apartments');
         }
     }
     if (param('useTypePrivatisation', 1)) {
         if (in_array(Apartment::PRICE_PRIVATISATION, $result)) {
             $types[Apartment::PRICE_PRIVATISATION] = tt('Privatisation', 'apartments');
         }
     }
     if (param('useTypeRent', 1)) {
         if (in_array(Apartment::PRICE_PER_DAY, $result)) {
             $types[Apartment::PRICE_PER_DAY] = tc('rent by the day');
         }
         if (in_array(Apartment::PRICE_PER_HOUR, $result)) {
             $types[Apartment::PRICE_PER_HOUR] = tc('rent by the hour');
         }
         if (in_array(Apartment::PRICE_PER_MONTH, $result)) {
             $types[Apartment::PRICE_PER_MONTH] = tc('rent by the month');
         }
         if (in_array(Apartment::PRICE_PER_WEEK, $result)) {
             $types[Apartment::PRICE_PER_WEEK] = tc('rent by the week');
         }
     }
     $return['propertyType'] = $types;
     if (issetModule('selecttoslider') && param('usePriceSlider') == 1) {
         $return['currencyTitle'] = array(Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':', Yii::t('common', 'Price range') . ':');
     } else {
         $return['currencyTitle'] = array(Yii::t('common', 'Payment to'), Yii::t('common', 'Payment to'), Yii::t('common', 'Fee up to'), Yii::t('common', 'Fee up to'), Yii::t('common', 'Fee up to'), Yii::t('common', 'Fee up to'));
     }
     return $return;
 }