本文整理汇总了PHP中Apartment::getUrlById方法的典型用法代码示例。如果您正苦于以下问题:PHP Apartment::getUrlById方法的具体用法?PHP Apartment::getUrlById怎么用?PHP Apartment::getUrlById使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Apartment
的用法示例。
在下文中一共展示了Apartment::getUrlById方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getImgForSlider
public static function getImgForSlider()
{
$ownerActiveCond = '';
if (param('useUserads')) {
$ownerActiveCond = ' AND owner_active = ' . Apartment::STATUS_ACTIVE . ' ';
}
$sql = " SELECT i.id, i.id_object, i.file_name, i.file_name_modified, i.is_main, a.title_" . Yii::app()->language . " AS title\n\t\t\t\t FROM {{images}} i\n\t\t\t\t INNER JOIN {{apartment}} a ON a.id = i.id_object\n\t\t\t\t INNER JOIN {{apartment_paid}} ap ON ap.apartment_id = i.id_object\n\t\t\t\t WHERE ap.paid_id = :paid_id AND ap.status = 1 AND a.active=" . Apartment::STATUS_ACTIVE . " {$ownerActiveCond} AND i.is_main=1 GROUP BY ap.apartment_id";
$images = Yii::app()->db->createCommand($sql)->queryAll(true, array(':paid_id' => PaidServices::ID_ADD_IN_SLIDER));
$imgs = array();
if ($images) {
foreach ($images as $image) {
$imgs[$image['id_object']]['url'] = Apartment::getUrlById($image['id_object']);
$imgs[$image['id_object']]['title'] = $image['title'];
$imgs[$image['id_object']]['src'] = $class = Yii::app()->theme->name != 'classic' ? Images::getThumbUrl($image, 663, 380) : Images::getThumbUrl($image, param('slider_img_width', 500), param('slider_img_height', 280));
}
}
return $imgs;
}
示例2: tc
echo tc('Add amount of');
?>
<?php
echo CHtml::textField('amount', 100) . ' ' . Currency::getDefaultCurrencyName();
?>
</div>
</p>
<?php
} else {
?>
<p>
<?php
echo tc('Will be used for listings');
?>
ID: <?php
echo CHtml::link($ad_id, Apartment::getUrlById($ad_id));
?>
</p>
<?php
}
?>
<?php
Yii::app()->getModule('payment');
if ($paidService->id != PaidServices::ID_ADD_FUNDS) {
$paySystems = Paysystem::getPaysystems();
} else {
$paySystems = Paysystem::getPaysystemsWithoutBalance();
}
$paySystemsArray = CHtml::listData($paySystems, 'id', 'name');
echo '<p>';