当前位置: 首页>>代码示例>>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;未经允许,请勿转载。