本文整理匯總了PHP中Yii::T方法的典型用法代碼示例。如果您正苦於以下問題:PHP Yii::T方法的具體用法?PHP Yii::T怎麽用?PHP Yii::T使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Yii
的用法示例。
在下文中一共展示了Yii::T方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: foreach
foreach (Yii::$app->session->getAllFlashes() as $key => $message) {
if ($key == 'error') {
$key = 'danger';
}
echo '<div class="alert alert-' . $key . '">' . $message . '</div>';
}
?>
</div>
</div>
</div>
<footer class="footer">
<div class="container">
<p style="text-align:center">© <?php
echo Yii::T('app', 'GaggleTag Ltd.');
?>
<?php
echo date('Y');
?>
</p>
</div>
</footer>
<?php
$this->endBody();
?>
</body>
</html>
<?php
$this->endPage();
示例2:
<div class="md01sHead">
<h3><?php
echo Yii::t('frontend', 'Upload image');
?>
</h3>
</div>
<div class="md01sContent clearfix">
<div class="cropImgBox left">
<div class="imageBox">
<div class="thumbBox"></div>
<div class="spinner" style="display: none">Loading...</div>
</div>
<div class="action">
<input type="file" id="file" style="float:left; width: 250px" class="filestyle" data-buttonText="Chọn ảnh" data-classButton="btn btn-primary">
<input type="button" id="btnCrop" value="<?php
echo Yii::T('frontend', 'Crop image');
?>
" style="float: right">
<input type="button" id="btnZoomIn" value="+" style="float: right">
<input type="button" id="btnZoomOut" value="-" style="float: right">
</div>
<div style="display:none;" id="userid"><?php
echo Yii::$app->user->id;
?>
</div>
</div>
<div class="cropImgBox left">
<!-- div holder img after crop -->
<div class="cropped"><img src="/images/avatar_no_image.gif" alt="Avatar"></div>
<!-- div holder img after crop -->
<div style="clear:both;">