當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Html::getAttributeValue方法代碼示例

本文整理匯總了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);
    }
開發者ID:sya0710,項目名稱:yii2-payment,代碼行數:19,代碼來源:Payment.php

示例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;
 }
開發者ID:sya0710,項目名稱:yii2-gallery,代碼行數:13,代碼來源:Gallery.php

示例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 
}
?>
開發者ID:hiqdev,項目名稱:hipanel-core,代碼行數:31,代碼來源:AmountWithCurrency.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]);
 }
開發者ID:heartshare,項目名稱:yii2-gallery,代碼行數:5,代碼來源:Gallery.php


注:本文中的yii\bootstrap\Html::getAttributeValue方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。