本文整理汇总了PHP中yii\bootstrap\Html::getAttributeValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Html::getAttributeValue方法的具体用法?PHP Html::getAttributeValue怎么用?PHP Html::getAttributeValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类yii\bootstrap\Html
的用法示例。
在下文中一共展示了Html::getAttributeValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: registerAssets
private function registerAssets()
{
$this->getView()->registerJs('
function changeValueStatusPayment(element){
var status = $(element).val();
if (status == "' . self::STATUS_TRANSFER . '") {
$(".status_payment").hide();
$("#status_payment_" + status).show();
} else {
$(".status_payment").hide();
}
}
', View::POS_END);
$this->getView()->registerJs('
var status = "' . Html::getAttributeValue($this->model, $this->attribute . '[status]') . '";
$("#status_payment_" + status).show();
', View::POS_READY);
}
示例2: renderInfomation
/**
* Function render infomation basic for image
* @return null|string
*/
protected function renderInfomation()
{
$template = null;
$galleries = Html::getAttributeValue($this->model, $this->attribute);
if (!empty($galleries)) {
$template .= $this->generateGalleryTemplate($galleries, $this->columns, $this->moduleName, $this->attribute, $this->infomationImage, $this->infomationImageDetail);
}
return $template;
}
示例3:
<?php
use hipanel\helpers\StringHelper;
use yii\helpers\ArrayHelper;
use yii\bootstrap\Html;
?>
<div class="input-group">
<div class="input-group-btn">
<button type="button" class="btn btn-default iwd-label dropdown-toggle" data-toggle="dropdown">
<?php
echo StringHelper::getCurrencySymbol(Html::getAttributeValue($model, $currencyAttributeName));
?>
</button>
<button type=button class="btn btn-default dropdown-toggle" data-toggle="dropdown">
<span class="caret"></span> <span class="sr-only"><?php
echo Yii::t('hipanel', 'Toggle dropdown');
?>
</span>
</button>
<ul class="dropdown-menu">
<?php
foreach (ArrayHelper::remove($currencyAttributeOptions, 'items', []) as $k => $v) {
?>
<li>
<?php
echo Html::a(StringHelper::getCurrencySymbol($k), '#', ['data-value' => $k, 'data-label' => StringHelper::getCurrencySymbol($k)]);
?>
</li>
<?php
}
?>
示例4: run
public function run()
{
$galleries = Html::getAttributeValue($this->model, $this->attribute);
return $this->render('gallery', ['moduleName' => $this->moduleName, 'columns' => $this->columns, 'galleries' => $galleries]);
}