本文整理汇总了PHP中Listing::getViewDetailTenure方法的典型用法代码示例。如果您正苦于以下问题:PHP Listing::getViewDetailTenure方法的具体用法?PHP Listing::getViewDetailTenure怎么用?PHP Listing::getViewDetailTenure使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Listing
的用法示例。
在下文中一共展示了Listing::getViewDetailTenure方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: actionSearch
public function actionSearch()
{
$this->checkRequest();
$q = $this->q;
$this->checkRequiredParams($q, array('token', 'user_id', 'status', 'type', 'page'));
$this->checkToken();
//same as login session
$criteria = new CDbCriteria();
$criteria->compare('user_id', $q->user_id);
$criteria->compare('status_listing', $q->status);
$criteria->compare('listing_type', $q->type);
$criteria->limit = 20;
$criteria->order = 'property_name_or_address ASC';
$models = Listing::model()->findAll($criteria);
$items = array();
foreach ($models as $model) {
$items[] = array('property_name_or_address' => $model->property_name_or_address, 'tenure' => Listing::getViewDetailTenure($model));
}
$result = ApiModule::$defaultSuccessResponse;
$result['list'] = $items;
$result['message'] = Yii::t('systemmsg', 'Query success');
//always need
ApiModule::sendResponse($result);
}
示例2:
</div>
<div class="col-sm-6">
<ul class="list-unstyled">
<li><span><?php
echo $model->getAttributeLabel('furnished');
?>
:</span><strong><?php
echo $model->rFurnished ? $model->rFurnished->name : '';
?>
</strong></li>
<li><span>Developer:</span><strong><?php
echo $model->developer;
?>
</strong></li>
<li><span>Tenure:</span> <strong><?php
echo Listing::getViewDetailTenure($model);
?>
</strong></li>
<?php
if ($model->listing_type == Listing::FOR_RENT) {
?>
<?php
if ($model->rLeaseTerm) {
?>
<li><span>Lease Term:</span><strong><?php
echo $model->rLeaseTerm->name;
?>
</strong></li>
<?php
}