本文整理汇总了PHP中Listing::getViewStatus方法的典型用法代码示例。如果您正苦于以下问题:PHP Listing::getViewStatus方法的具体用法?PHP Listing::getViewStatus怎么用?PHP Listing::getViewStatus使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Listing
的用法示例。
在下文中一共展示了Listing::getViewStatus方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionIndex
public function actionIndex($status = null, $listing_type = null, $pro_type = NULL)
{
// Listing::SqlUpdateInfo();
$model = new Listing();
$agent = '';
if (isset($_GET['user_id']) && is_numeric($_GET['user_id'])) {
$model->user_id = (int) $_GET['user_id'];
$agent = Users::model()->findByPk($model->user_id);
}
//status
if (empty($status)) {
$model->status_listing = STATUS_LISTING_ACTIVE;
} else {
$model->status_listing = $status;
}
//listing type
if (!empty($listing_type) && is_numeric($listing_type) && ($listing_type >= 1 && $listing_type <= 2)) {
$model->listing_type = $listing_type;
}
//property type
if (!empty($pro_type) && is_numeric($pro_type)) {
$model->property_type_1 = $pro_type;
}
$view = Listing::getViewStatus($status, STATUS_LISTING_ACTIVE);
if (isset($_GET['Listing'])) {
$model->attributes = $_GET['Listing'];
}
$this->render("index_{$view}", array('model' => $model, 'agent' => $agent, 'actions' => $this->listActionsCanAccess));
}
示例2: actionIndex
public function actionIndex($status = null, $listing_type = null, $pro_type = NULL)
{
$this->pageTitle = 'Listing Management' . ' - ' . Yii::app()->params['title'];
$model = new Listing();
$model->user_id = $this->userID;
//status
if (empty($status)) {
$model->status_listing = STATUS_LISTING_ACTIVE;
} else {
$model->status_listing = $status;
}
//listing type
if (!empty($listing_type) && is_numeric($listing_type) && ($listing_type >= 1 && $listing_type <= 2)) {
$model->listing_type = $listing_type;
}
// ANH DUNG CLOSE JUL 23, 2014 property type
// if (!empty($pro_type) && is_numeric($pro_type)) $model->property_type_1 = $pro_type;
if (isset($_GET['Listing'])) {
$model->attributes = $_GET['Listing'];
}
$view = Listing::getViewStatus($status, STATUS_LISTING_ACTIVE);
$this->render("index_{$view}", array('model' => $model));
}