当前位置: 首页>>代码示例>>PHP>>正文


PHP Locale::formatPrice方法代码示例

本文整理汇总了PHP中Locale::formatPrice方法的典型用法代码示例。如果您正苦于以下问题:PHP Locale::formatPrice方法的具体用法?PHP Locale::formatPrice怎么用?PHP Locale::formatPrice使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Locale的用法示例。


在下文中一共展示了Locale::formatPrice方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: url

							</ul>
						</div>
					</div>
				</div>
			</div>
			<?php 
$this->renderPartial('home/featuredVideo', ['model' => $featuredVideo]);
?>
		</div>

		<div class="row margin-bottom row-most-viewed-pick-agent">
			<?php 
if (isset($mostViewed[0])) {
    $instruction = $mostViewed[0];
    $info = $instruction->property->getShortAddressString(', ');
    $priceInfo = $instruction->dea_qualifier === Deal::QUALIFIER_POA ? Deal::QUALIFIER_POA : Locale::formatPrice($instruction->dea_marketprice);
    ?>
				<div class="span4 home-container-small"
					 style="background-image: url(<?php 
    echo $instruction->getMainImage()->getMediaImageURIPath('_large');
    ?>
)">
					<div class="top-part"></div>
					<div class="bottom-part">
						<div class="inner-padding">
							<div class="header">
								<a href="/topTwenty" class="white-text-shadow">MOST VIEWED</a>
							</div>
							<div class="content">
								<?php 
    echo CHtml::link($info . ' ' . $priceInfo, "/details/" . $instruction->dea_id, ['class' => 'gray hover bold white-text-shadow']);
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:index.php

示例2: date

    ?>
</span>
								<?php 
    echo $form->hiddenField($model, 'off_timestamp', ['value' => date('Y-m-d H:i:s')]);
    ?>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label"><?php 
    echo $form->controlLabel($model, 'off_price');
    ?>
</label>

							<div class="controls">
								<span class="text"><?php 
    echo Locale::formatPrice($model->off_price);
    ?>
</span>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label"><?php 
    echo $form->controlLabel($model, 'off_status');
    ?>
</label>

							<div class="controls hint">
								<?php 
    echo $form->dropDownList($model, 'off_status', Offer::getStatuses(), ['disabled' => $model->off_status == Offer::STATUS_DELETED]);
    ?>
								<?php 
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:edit.php

示例3: isset

								<div class="block titles">
									<div class="inner-block">
										<h3 class="title">
											<a href="<?php 
    echo $this->detailPage($instruction->dea_id);
    ?>
"><?php 
    echo $instruction->property->getShortAddressString(', ', true);
    ?>
</a>
										</h3>

										<div class="subtitle">
										<span>
										<?php 
    echo Locale::formatPrice($instruction->getPrice(isset($_GET['Deal']['priceMode']) ? $_GET['Deal']['priceMode'] : ""), $instruction->dea_type == 'Sales' ? false : true, isset($_GET['Deal']['priceMode']) ? $_GET['Deal']['priceMode'] : "");
    ?>
										</span>
										<?php 
    if ($instruction->getQualifier()) {
        ?>
											<div class="vertical-separator"></div>
											<span><?php 
        echo $instruction->getQualifier();
        ?>
</span>
										<?php 
    }
    ?>
										<div class="vertical-separator"></div>
										<?php 
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:propertyCategory.php

示例4: array

<?php

/**
 * @var $this  InstructionController
 * @var $model Deal
 * @var $form  AdminForm
 */
$form = $this->beginWidget('AdminForm', ['id' => 'custom-mailshot-form', 'htmlOptions' => array('enctype' => 'multipart/form-data')]);
$propTitle = $model->property->getShortAddressString(', ', true);
$price = Locale::formatPrice($model->dea_marketprice, $model->dea_type == 'Sales' ? false : true);
?>
<div class="row-fluid">
	<div class="span12">
		<fieldset>
			<div class="block-header">Send custom mailshot</div>
			<div class="clearfix"></div>
			<div class="control-group">
				<label class="control-label" for="">mailshot type</label>

				<div class="controls"><?php 
echo CHtml::dropDownList('mailshot[type]', 'new', Deal::getMailshotTypes());
?>
</div>
			</div>
			<div class="control-group">
				<label class="control-label" for="">mailshot Text</label>

				<div class="controls"><?php 
echo CHtml::textArea('mailshot[body]', '', array('class' => 'input-xxlarge'));
?>
</div>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:customMailshot.php

示例5: empty

        echo $clientName . $offerPrice;
    }
}
?>
	</div>
	<?php 
echo $form->endControlGroup();
?>

	<div class="control-group">
		<label class="control-label">Price</label>

		<div class="controls text">
			<?php 
if ($model->dea_type == 'Lettings') {
    echo Locale::formatPrice($model->dea_marketprice, true, 'pcm') . ' - ' . Locale::formatPrice($model->getPrice('p/w'), true, 'p/w');
} else {
    $thisPrice = $model->getPrice();
    echo Locale::formatCurrency($thisPrice);
    echo $tenure = empty($thisPrice) ? ' (Valuation)' : ' ' . $model->dea_tenure;
}
?>
		</div>
	</div>

	<?php 
if ($model->owner) {
    ?>
		<div class="control-group">
			<label class="control-label">Vendors</label>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:30,代码来源:propertySummary.php

示例6: array

?>
" class="btn btn-small">Show All</a>
	</div>
	</div>
</fieldset>
<?php 
$this->endWidget();
$editColumn = array('type' => 'raw', 'htmlOptions' => ['class' => 'centered-text'], 'value' => function (Deal $data) {
    $html = CHtml::link(CHtml::image('/images/sys/admin/icons/edit-icon.png', 'Edit instruction'), InstructionController::generateLinkToInstruction($data->dea_id));
    $html .= CHtml::link(CHtml::image('/images/sys/admin/icons/print-icon.png', 'Print instruction'), ['/property/pdf', 'id' => $data->dea_id], ['target' => '_blank']);
    return $html;
});
$this->widget('AdminGridView', array('id' => 'instruction-list', 'dataProvider' => $model->search(), 'selectableRows' => 1000, 'selectionChanged' => 'instructionListSelectionChanged', 'title' => 'INSTRUCTIONS', 'columns' => array($editColumn, 'dea_id::ID', array('name' => 'dea_created', 'header' => 'created', 'value' => function (Deal $data) {
    return Date::formatDate('d/m/Y', $data->dea_created);
}), array('name' => 'dea_marketprice', 'header' => 'Price', 'type' => 'raw', 'value' => function (Deal $data) {
    return Locale::formatPrice($data->dea_marketprice, $data->dea_type == Deal::TYPE_LETTINGS);
}), array('name' => 'negotiator.use_fname', 'header' => "Neg'", 'type' => 'raw', 'value' => function (Deal $data) {
    if (!$data->negotiator) {
        return '<span class="negotiator-color empty"></span>N/A';
    }
    return '<span class="negotiator-color" style="background: #' . $data->negotiator->use_colour . '"></span><span title="' . $data->negotiator->getFullName() . '">' . $data->negotiator->getInitials() . '</span>';
}), array('name' => 'address.fullAddressString', 'value' => function (Deal $data) {
    return $data->address ? $data->address->getFullAddressString(", ") : '';
}, 'header' => 'Address'), array('name' => 'address.postcode', 'header' => 'Postcode'), array('name' => 'owners', 'header' => 'Vendors', 'type' => 'raw', 'value' => function (Deal $data) {
    $owners = [];
    foreach ($data->owner as $key => $owner) {
        $owners[] = CHtml::link($owner->getFullName(), Yii::app()->createUrl('admin4/client/update', ['id' => $owner->cli_id]), ['class' => 'table-link']);
    }
    return implode(', ', $owners);
}), $editColumn)));
?>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:detailSearch.php

示例7: foreach

<?php

/**
 * @var $instructionVideos
 */
?>
<div class="row margin-bottom">
	<div class="span12 scroll-gallery-container">
		<?php 
foreach ($instructionVideos as $i => $video) {
    $instruction = $video->instruction;
    $photo = $instruction->photos && $instruction->getMainImage()->getMediaImageURIPath(Media::SUFFIX_THUMB1) ? $instruction->getMainImage()->getMediaImageURIPath(Media::SUFFIX_THUMB1) : Icon::NO_IMAGE_AVAILABLE;
    $info = $instruction->property->getLine(3) . '<br>' . Locale::formatPrice($instruction->dea_marketprice);
    ?>
			<div class="home-video-container <?php 
    echo !$i ? 'first' : '';
    ?>
"
				 style="background-image: url(<?php 
    echo $photo;
    ?>
);">
				<div class="top-part">
					<a href="http://player.vimeo.com/video/<?php 
    echo $video->videoId;
    ?>
?autoplay=1"
					   class="play-video">
						<img src="<?php 
    echo Icon::PUBLIC_VIDEO_PLAY_ICON_SMALL;
    ?>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:instructionVideos.php

示例8: foreach

						<th></th>
					</tr>
					<?php 
    foreach ($offers as $offer) {
        ?>

						<tr <?php 
        echo $offer->off_status == Offer::STATUS_ACCEPTED ? 'class="accepted-offer"' : '';
        ?>
>
							<td><?php 
        echo Date::formatDate('d/m/Y', $offer->off_timestamp);
        ?>
</td>
							<td><?php 
        echo Locale::formatPrice($offer->off_price);
        ?>
</td>
							<td>
								<span class="negotiator-color"
									  style="background: #<?php 
        echo $offer->negotiator->use_colour;
        ?>
"></span><?php 
        echo $offer->negotiator->getFullName();
        ?>
							</td>
							<td>
								<?php 
        $clientList = [];
        foreach ($offer->clients as $client) {
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:listOffers.php

示例9: url

<?php

/**
 * @var $this  SiteController
 * @var $model InstructionVideo
 */
$title = $model->instruction->property->getShortAddressString(', ') . ' ' . ($model->instruction->dea_qualifier === Deal::QUALIFIER_POA ? Deal::QUALIFIER_POA : Locale::formatPrice($model->instruction->dea_marketprice));
?>

<div class="span4 home-container-small"
	 style="background-image: url(<?php 
echo $model->instruction->getMainImage()->getMediaImageURIPath('_large');
?>
);">
	<div class="top-part">
		<a href="//player.vimeo.com/video/<?php 
echo $model->videoId;
?>
?autoplay=1"
		   class="play-video">
			<img src="<?php 
echo Icon::PUBLIC_VIDEO_PLAY_ICON;
?>
">
		</a>
	</div>
	<div class="bottom-part">
		<div class="inner-padding">
			<div class="header">
				<a href="//player.vimeo.com/video/<?php 
echo $model->videoId;
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:featuredVideo.php

示例10: emailText

    public function emailText($format, $email, $name = null, $viewing = true)
    {
        if (!$name) {
            // any false value can't be name
            $name = $recipient = $email;
        } else {
            $recipient = $name . ' (' . $email . ')';
        }
        /** @var $officeData Office[] */
        if ($format === 'html') {
            $contactUsText = '<p>Contact our ' . $this->deal->branch->bra_title . ' office on ' . $this->deal->branch->bra_tel . '</p>
							<p>' . $this->deal->dea_strapline . '<br />' . $this->deal->property->address->getLine(3) . ', ' . $this->deal->property->getFirstPostcodePart() . '<br />' . Locale::formatPrice($this->deal->dea_marketprice, $this->deal->dea_type == 'sales' ? false : true) . '<br />
							<a href="http://' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '">' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '</a></p>
							</span>';
            if ($viewing) {
                return '<html>
				<head></head>
				<body>
				<span style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000">
				<p>Hi ' . $name . ',</p>
				<p>Many thanks for your interest. We will be getting back to you shortly to confirm your viewing. Please do call us at any time if you would like to speak to a negotiator to discuss your requirements further.</p>
				' . $contactUsText . '
				<p>Kind Regards,<br>Wooster & Stock</p>
				' . EmailHelper::signature() . '

				' . EmailHelper::disclaimer($recipient);
            } else {
                return '<span style="font-family:Arial, Helvetica, sans-serif; font-size:13px; color:#000000">
				<p>Hi ' . $name . ',</p>
				<p>Many thanks for your interest. We will let you know if this property comes back on the market. Please do call us at any time if you would like to speak to a negotiator to discuss your requirements further.</p>
				' . $contactUsText . '
				<p>Kind Regards,<br>Wooster & Stock</p>
				' . EmailHelper::signature() . '

				' . EmailHelper::disclaimer($recipient);
            }
        } else {
            if ($viewing) {
                return 'Hi ' . $name . ',

							Many thanks for your interest. We will be getting back to you shortly to confirm your viewing. Please do call us at any
							time if you would like to speak to a negotiator to discuss your requirements further.

							Contact our ' . $this->deal->branch->bra_title . ' office on ' . $this->deal->branch->bra_tel . '

							' . $this->deal->dea_strapline . '
							' . $this->deal->property->address->getLine(3) . ', ' . $this->deal->property->getFirstPostcodePart() . '
							' . Locale::formatPrice($this->deal->dea_marketprice, $this->deal->dea_type == 'sales' ? false : true) . '<br />
							' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '

							' . EmailHelper::signature(EmailHelper::TYPE_TEXT) . '

							' . EmailHelper::disclaimer($recipient, EmailHelper::TYPE_TEXT);
            } else {
                return 'Hi ' . $name . ',

				Many thanks for your interest. We will let you know if this property comes back on the market. Please do call us at any
				time if you would like to speak to a negotiator to discuss your requirements further.

				Contact our ' . $this->deal->branch->bra_title . ' office on ' . $this->deal->branch->bra_tel . '

				' . $this->deal->dea_strapline . '
				' . $this->deal->property->address->getLine(3) . ', ' . $this->deal->property->getFirstPostcodePart() . '
				' . Locale::formatPrice($this->deal->dea_marketprice, $this->deal->dea_type == 'sales' ? false : true) . '<br />
				' . Yii::app()->params['hostname'] . '/details/' . $this->deal->dea_id . '
				' . EmailHelper::signature(EmailHelper::TYPE_TEXT) . '

				' . EmailHelper::disclaimer($recipient, EmailHelper::TYPE_TEXT);
            }
        }
    }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:71,代码来源:BookAViewing.php

示例11: array

<?php

/**
 * @var $this        InstructionController
 * @var $model       Client
 * @var $instruction Deal
 *
 */
$price = Locale::formatPrice($instruction->dea_marketprice, $instruction->dea_type == Deal::TYPE_LETTINGS);
if ($instruction->dea_type == 'Lettings') {
    $price .= ' - ' . Locale::formatPrice($instruction->getPrice('pcm'), true, true);
}
$editColumn = array('type' => 'raw', 'htmlOptions' => ['class' => 'centered-text'], 'value' => function (Client $data) {
    $html = CHtml::link(CHtml::image('/images/sys/admin/icons/edit-icon.png', 'Edit instruction'), Yii::app()->createUrl('admin4/client/update', ['id' => $data->cli_id]));
    return $html;
});
$columns = array($editColumn, 'cli_id::id', 'cli_fname::Name', 'cli_sname::Surname', 'cli_saleemail::send sales emails', 'cli_email::Email', 'cli_salebed::Max bedrooms', 'cli_salemin::Min price', 'cli_salemax::Max price', 'cli_saleptype::property type', $editColumn);
if ($instruction->dea_type == Deal::TYPE_LETTINGS) {
    $columns = array($editColumn, 'cli_id::id', 'cli_fname::Name', 'cli_sname::Surname', 'cli_saleemail::send letting emails', 'cli_email::Email', 'cli_letbed::Max bedrooms', 'cli_letmin::Min price', 'cli_letmax::Max price', 'cli_letptype::property type', $editColumn);
}
?>
<div class="row-fluid">
	<div class="span12">
		<fieldset>
			<div class="block-header">Instruction info</div>
			<div class="control-group shaded">
				<label class="control-label">Location</label>

				<div class="controls text"><?php 
echo $instruction->property->getAddressObject()->getFullAddressString(', ');
?>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:matchClients.php

示例12: formatPrice

 /**
  * @param $price
  * @return string
  */
 private function formatPrice($price)
 {
     return $price ? html_entity_decode(Locale::formatPrice($price)) : '';
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:8,代码来源:InstructionController.php

示例13:

										<h3 class="title">
											<a href="<?php 
    echo $this->detailPage($instruction->dea_id);
    ?>
">
												<?php 
    echo $instruction->property->getShortAddressString(', ', $isMobile ? false : true);
    ?>
											</a>
										</h3>
										<div class="subtitle">
											<?php 
    if ($instruction->dea_qualifier !== Deal::QUALIFIER_POA) {
        ?>
												<?php 
        echo Locale::formatPrice($instruction->getPrice());
        ?>
												<div class="vertical-separator"></div>
											<?php 
    }
    ?>
											<?php 
    if ($instruction->getQualifier()) {
        ?>
												<?php 
        echo $instruction->getQualifier();
        ?>
												<div class="vertical-separator"></div>
											<?php 
    }
    ?>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:topProperties.php

示例14: getPriceWithQualifier

 public function getPriceWithQualifier(Deal $model)
 {
     $price = Locale::formatPrice($model->dea_marketprice);
     if ($model->dea_qualifier === Deal::QUALIFIER_POA) {
         $price = "POA" . ($model->dea_tenure ? ',' : '');
     } elseif ($model->dea_qualifier !== Deal::QUALIFIER_NONE) {
         $price .= ' ' . $model->dea_qualifier . ($model->dea_tenure ? ',' : '');
     }
     $price .= $model->dea_tenure ? " " . $model->dea_tenure : "";
     return $price;
 }
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:11,代码来源:PropertyController.php

示例15:

		<div class="inner-block">
			<h3 class="title">
				<a href="<?php 
echo $detailPageUrl;
?>
"><?php 
echo $data->property->getShortAddressString(', ', $isMobile ? false : true);
?>
</a>
			</h3>
			<div class="subtitle">
				<?php 
if ($data->dea_qualifier !== Deal::QUALIFIER_POA) {
    ?>
					<?php 
    echo Locale::formatPrice($data->getPrice(isset($_GET['Deal']['priceMode']) ? $_GET['Deal']['priceMode'] : ""));
    ?>
					<div class="vertical-separator"></div>
				<?php 
}
?>
				<?php 
if ($data->getQualifier()) {
    ?>
					<?php 
    echo $data->getQualifier();
    ?>
					<div class="vertical-separator"></div>
				<?php 
}
?>
开发者ID:jankichaudhari,项目名称:yii-site,代码行数:31,代码来源:view.php


注:本文中的Locale::formatPrice方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。