本文整理汇总了PHP中Property::getPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP Property::getPrice方法的具体用法?PHP Property::getPrice怎么用?PHP Property::getPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Property
的用法示例。
在下文中一共展示了Property::getPrice方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getPriceMin
/**
*
*/
public static function getPriceMin()
{
$args = array();
$args['post_status'] = 'publish';
$args['post_type'] = 'properties';
$args['posts_per_page'] = PHP_INT_MAX;
$curr_lang = estetico_surpress_wpml_query_before();
$properties = new WP_Query($args);
estetico_surpress_wpml_query_after($curr_lang);
// Set price to unbelievable high number. Although with current US economy this might be a problem at some point :)
$price = 9999999999.0;
foreach ($properties->posts as $property) {
$p = new Property();
$p->setData($property);
$_price = $p->getPrice(null, true);
if ($_price < $price) {
$price = $_price;
}
}
return $price;
}
示例2:
?>
"></div>
</div>
<?php
}
?>
<div class="prices-wrapper">
<?php
$for_sale_rent = $property->getForSaleRent();
if ($for_sale_rent == 'sale' || $for_sale_rent == 'both') {
?>
<div class="price"><?php
echo __('Price for sale', THEME_NAME);
?>
: <?php
echo $property->getPrice(true);
?>
</div>
<?php
}
?>
<?php
if (($for_sale_rent == 'rent' || $for_sale_rent == 'both') && $property->getRentMonthPrice(false) > 0) {
?>
<div class="price <?php
echo $for_sale_rent;
?>
month"><?php
echo __('Price for rent', THEME_NAME);
?>
: <?php