本文整理汇总了PHP中Apartment::getApTypes方法的典型用法代码示例。如果您正苦于以下问题:PHP Apartment::getApTypes方法的具体用法?PHP Apartment::getApTypes怎么用?PHP Apartment::getApTypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Apartment
的用法示例。
在下文中一共展示了Apartment::getApTypes方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: apTypes
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: apTypes
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;
}