本文整理汇总了PHP中Listing::getformatPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP Listing::getformatPrice方法的具体用法?PHP Listing::getformatPrice怎么用?PHP Listing::getformatPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Listing
的用法示例。
在下文中一共展示了Listing::getformatPrice方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionAutocomplete
public function actionAutocomplete()
{
$this->layout = false;
$criteria = new CDbCriteria();
$criteria->addSearchCondition('t.property_name_or_address', ActiveRecord::safeField($_GET['term']), true);
$criteria->compare('t.status', STATUS_ACTIVE);
$criteria->compare('t.user_id', $this->userID);
// $criteria->limit = 20;
$models = Listing::model()->findAll($criteria);
$returnVal = array();
foreach ($models as $model) {
$returnVal[] = array('label' => $model->property_name_or_address, 'value' => $model->property_name_or_address, 'Listing_property_type_1' => $model->property_type_1, 'Listing_property_type_2' => $model->property_type_2, 'Listing_unit_from' => $model->unit_from, 'Listing_unit_to' => $model->unit_to, 'Listing_price' => Listing::getformatPrice($model->price), 'Listing_office_bkank_valuation' => Listing::getformatPrice($model->office_bkank_valuation), 'Listing_of_bedroom' => $model->of_bedroom, 'Listing_floor_area' => $model->floor_area, 'Listing_hdb_town_estate' => $model->floor_area, 'Listing_developer' => $model->developer, 'Listing_tenure' => $model->tenure, 'Listing_field' => $model->postal_code, 'Listing_postal_code' => $model->postal_code, 'Listing_postal_code_xy' => $model->postal_code_xy);
}
echo CJSON::encode($returnVal);
Yii::app()->end();
}