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


PHP Html::a方法代碼示例

本文整理匯總了PHP中kartik\helpers\Html::a方法的典型用法代碼示例。如果您正苦於以下問題:PHP Html::a方法的具體用法?PHP Html::a怎麽用?PHP Html::a使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在kartik\helpers\Html的用法示例。


在下文中一共展示了Html::a方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: run

 public function run()
 {
     $this->genButton = Html::a(Icon::show('edit') . Yii::t('app', 'Generate'), '#', ['class' => 'btn btn-success', 'id' => 'btn-generate']);
     $parent_id = $this->model->main_category_id;
     $owner_id = $this->model->id;
     $this->addButton = Html::a(Icon::show('plus') . Yii::t('app', 'Add'), Url::toRoute(['/shop/backend-product/edit', 'parent_id' => $parent_id, 'owner_id' => $owner_id, 'returnUrl' => \app\backend\components\Helper::getReturnUrl()]), ['class' => 'btn btn-success', 'id' => 'btn-add']);
     if (!empty($this->footer)) {
         $this->footer = Html::tag('div', $this->addButton . ' ' . $this->genButton, ['class' => 'widget-footer']);
     }
     $this->object = Object::getForClass(get_class($this->model));
     $rest_pg = (new Query())->select('id, name')->from(PropertyGroup::tableName())->where(['object_id' => $this->object->id])->orderBy('sort_order')->all();
     $this->property_groups_to_add = [];
     foreach ($rest_pg as $row) {
         $this->property_groups_to_add[$row['id']] = $row['name'];
     }
     $optionGenerate = Json::decode($this->model->option_generate);
     if (null === PropertyGroup::findOne($optionGenerate['group'])) {
         $this->model->option_generate = $optionGenerate = null;
     }
     $groupModel = null;
     if (isset($optionGenerate['group'])) {
         $groupModel = PropertyGroup::findOne($optionGenerate['group']);
         $properties = Property::getForGroupId($optionGenerate['group']);
     } else {
         $group_ids = array_keys($this->property_groups_to_add);
         $group_id = array_shift($group_ids);
         $groupModel = PropertyGroup::findOne($group_id);
         $properties = Property::getForGroupId($group_id);
     }
     if (is_null($groupModel)) {
         $groupModel = new PropertyGroup();
     }
     return $this->render($this->viewFile, ['model' => $this->model, 'form' => $this->form, 'groups' => $this->property_groups_to_add, 'groupModel' => $groupModel, 'properties' => $properties, 'optionGenerate' => $optionGenerate, 'footer' => $this->footer]);
 }
開發者ID:tqsq2005,項目名稱:dotplant2,代碼行數:34,代碼來源:OptionGenerate.php

示例2: renderDataCellContent

 /**
  * @inheritdoc
  */
 protected function renderDataCellContent($model, $key, $index)
 {
     $value = $this->getDataCellValue($model, $key, $index);
     $text = $this->grid->formatter->format($value, $this->format);
     $url = $this->createUrl($model, $key, $index);
     $options = $this->targetBlank ? ['target' => '_blank'] : [];
     return $value === null ? $this->grid->emptyCell : Html::a($text, $url, $options);
 }
開發者ID:promo-pr,項目名稱:cms,代碼行數:11,代碼來源:LinkColumn.php

示例3: preNext

 public static function preNext()
 {
     $offset = max(0, \yii::$app->request->get('filter_offset', 0));
     $limit = \yii::$app->request->get('filter_limit', 100);
     $q = \yii::$app->request->queryParams;
     $panel = '<div class="btn-group" role="group">' . Html::a("上一頁", array_merge($q, [\yii::$app->controller->action->id, 'filter_limit' => $limit, 'filter_offset' => $offset - $limit > 0 ? $offset - $limit : 0]), ['class' => 'btn btn-default']) . Html::a("下一頁", array_merge($q, [\yii::$app->controller->action->id, 'filter_limit' => $limit, 'filter_offset' => $offset + $limit]), ['class' => 'btn btn-default']) . '</div>';
     return $panel;
 }
開發者ID:oyoy8629,項目名稱:yii-core,代碼行數:8,代碼來源:Page.php

示例4: sttPembukuan

function sttPembukuan($model)
{
    if ($model->STATUS == 0) {
        /*open*/
        return Html::a('<i class="glyphicon glyphicon-ok"></i> proses', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'process']);
    } elseif ($model->STATUS == 1) {
        /*closing*/
        return Html::a('<i class="fa fa-remove fa-md"></i> Closing', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '25px'], 'title' => 'Closing']);
    }
}
開發者ID:ptrnov,項目名稱:ubudsatu,代碼行數:10,代碼來源:index.php

示例5: status

function status($model)
{
    if ($model->STT_DEFAULT == 0) {
        return Html::a('<i class="glyphicon glyphicon-retweet"></i> Non Aktif', '#', ['class' => 'btn btn-warning btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } elseif ($model->STT_DEFAULT == 1) {
        return Html::a('<i class="glyphicon glyphicon-ok"></i> Aktif', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } else {
        return Html::a('<i class="glyphicon glyphicon-question-sign"></i> Unknown', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    }
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:10,代碼來源:index.php

示例6: tombolEditketerangan

function tombolEditketerangan($model)
{
    $title = Yii::t('app', '');
    $options = ['id' => 'edit-keterangan', 'data-toggle' => "modal", 'data-target' => "#keterangan", 'class' => 'btn btn-info btn-xs'];
    $icon = '<span class="glyphicon glyphicon-save"></span>';
    $label = $icon . ' ' . $title;
    $url = Url::toRoute(['/widget/berita/set-keterangan', 'id' => $model->KD_BERITA]);
    $content = Html::a($label, $url, $options);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:10,代碼來源:_view_detailberita_headline.php

示例7: statusRadius

function statusRadius($model)
{
    if ($model->sttKoordinat == 1) {
        return Html::a('<i class="glyphicon glyphicon-ok"></i> Suitable', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } elseif ($model->sttKoordinat == 2) {
        return Html::a('<i class="glyphicon glyphicon-time"></i> Deviate', '#', ['class' => 'btn btn-warning btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    } elseif ($model->sttKoordinat == 3) {
        return Html::a('<i class="glyphicon glyphicon-thumbs-down"></i> Missing', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Detail']);
    }
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:10,代碼來源:index.php

示例8: toExportExcel

function toExportExcel()
{
    $title = Yii::t('app', 'Excel');
    $options = ['id' => 'export-excel', 'class' => 'btn btn-default btn-sm'];
    $icon = '<span class="glyphicon glyphicon-search"></span>';
    $label = $icon . ' ' . $title;
    $url = Url::toRoute(['#']);
    $content = Html::a($label, $url, $options);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:10,代碼來源:index.php

示例9: tombolInvest

function tombolInvest()
{
    $title = Yii::t('app', 'Account Investment');
    $options = ['id' => 'account-invest', 'data-toggle' => "modal", 'data-target' => "#check-barang-umum", 'class' => 'btn btn-info btn-sm'];
    $icon = '<span class="glyphicon glyphicon-search"></span>';
    $label = $icon . ' ' . $title;
    $url = Url::toRoute(['#']);
    $content = Html::a($label, $url, $options);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:10,代碼來源:_viewData.php

示例10: tombolInvestInput

function tombolInvestInput($id)
{
    $title = Yii::t('app', 'Investment input');
    $options = ['id' => 'input-invest', 'data-toggle' => "modal", 'data-target' => "#input-invest-actual", 'class' => 'btn btn-info btn-sm'];
    $icon = '<span class="glyphicon glyphicon-search"></span>';
    $label = $icon . ' ' . $title;
    $url = Url::toRoute(['/purchasing/data-term/actual-review-add', 'id' => $id]);
    $content = Html::a($label, $url, $options);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:10,代碼來源:actual_review.php

示例11: kembali

function kembali()
{
    $title = Yii::t('app', '');
    $options = ['id' => 'berita-reply-id', 'class' => 'btn-xs', 'title' => 'Back'];
    $icon = '<span class="fa fa-rotate-left fa-xs"> Back</span>';
    $label = $icon . ' ' . $title;
    //$label = 'Reply';
    $url = Url::toRoute('/widget/chat');
    $content = Html::a($label, $url, $options);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:11,代碼來源:_chat_group_info.php

示例12: tombolMap

/**
 * Performance Employee
 * @author ptrnov  <piter@lukison.com>
 * @since 1.1
 */
function tombolMap()
{
    $title1 = Yii::t('app', 'Map');
    $options1 = ['id' => 'performance'];
    $icon1 = '<span class="fa fa-graduation-cap fa-md"></span>';
    $label1 = $icon1 . ' ' . $title1;
    $url1 = Url::toRoute(['/master/customers/esm-map']);
    //,'kd'=>$kd]);
    $content = Html::a($label1, $url1, $options1);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:16,代碼來源:map.php

示例13: tombolCreate

function tombolCreate()
{
    $title1 = Yii::t('app', 'Create');
    $options1 = ['id' => 'modl', 'data-toggle' => "modal", 'data-target' => "#form2", 'class' => 'btn btn-success btn-sm'];
    $icon1 = '<i class="glyphicon glyphicon-plus"></i>';
    $label1 = $icon1 . ' ' . $title1;
    $url1 = Url::toRoute(['/mastercrm/kota-customers-crm/createkota']);
    //,'kd'=>$kd]);
    $content = Html::a($label1, $url1, $options1);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:11,代碼來源:index.php

示例14: tombolLentera

/**
 * Logoff
 * @author ptrnov  <piter@lukison.com>
 * @since 1.1
 */
function tombolLentera()
{
    $title1 = Yii::t('app', ' . . . read-more');
    $options1 = ['id' => 'lentera', 'data-target' => "#dashboard-lentera", 'style' => 'color:rgba(255, 255, 19, 1)'];
    //$icon1 = '<span class="fa fa-power-off fa-lg"></span>';
    $label1 = $title1;
    //$icon1 . ' ' . $title1;
    $url1 = Url::toRoute(['/sistem/user-profile/lentera']);
    //,'kd'=>$kd]);
    $content = Html::a($label1, $url1, $options1);
    return $content;
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:17,代碼來源:index+-+Copy.php

示例15: statusTerm

function statusTerm($model)
{
    if ($model['STATUS'] == 0) {
        /*New*/
        return Html::a('<i class="fa fa-square-o fa-md"></i> New', '#', ['class' => 'btn btn-info btn-xs', 'style' => ['width' => '100px'], 'title' => 'New']);
    } elseif ($model['STATUS'] == 1) {
        /*Approved*/
        return Html::a('<i class="fa fa-check-square-o fa-md"></i>Approved', '#', ['class' => 'btn btn-success btn-xs', 'style' => ['width' => '100px'], 'title' => 'Approved']);
    } elseif ($model['STATUS'] == 3) {
        /*REJECT*/
        return Html::a('<i class="fa fa-remove fa-md"></i>Reject ', '#', ['class' => 'btn btn-danger btn-xs', 'style' => ['width' => '100px'], 'title' => 'Reject']);
    }
}
開發者ID:adem-team,項目名稱:advanced,代碼行數:13,代碼來源:index.php


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