当前位置: 首页>>代码示例>>PHP>>正文


PHP Icon::map方法代码示例

本文整理汇总了PHP中kartik\icons\Icon::map方法的典型用法代码示例。如果您正苦于以下问题:PHP Icon::map方法的具体用法?PHP Icon::map怎么用?PHP Icon::map使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在kartik\icons\Icon的用法示例。


在下文中一共展示了Icon::map方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: run

 public function run()
 {
     Icon::map($this->view, Icon::FA);
     echo "<div id='cjModalContent'>" . Icon::show('refresh fa-spin', [], Icon::FA) . "</div>";
     //        echo "".Icon::show('refresh fa-spin', [], Icon::FA)."";
     parent::run();
 }
开发者ID:claudejanz,项目名称:yii2-toolbox,代码行数:7,代码来源:AjaxModal.php

示例2: init

 public function init()
 {
     $this->registerTranslations();
     Icon::map($this->grid->getView(), Icon::FA);
     parent::init();
     // TODO: Change the autogenerated stub
 }
开发者ID:sibds,项目名称:yii2-gridhelper,代码行数:7,代码来源:ActionColumn.php

示例3: init

 public function init()
 {
     if ($this->parentType == null || $this->parentId == null) {
         throw new InvalidConfigException('The parentType and parentId properties must be set.');
     }
     Icon::map($this->getView());
 }
开发者ID:nhatvuvan,项目名称:yii2-widgets,代码行数:7,代码来源:Rating.php

示例4: init

 public function init()
 {
     Icon::map($this->getView(), Icon::FA);
     $this->registerScripts();
     // Change flv type for flowplayer
     $this->mime = $this->mime == 'video/x-flv' ? 'video/flv' : $this->mime;
     if (empty($this->url)) {
         throw new HttpException(500, 'Url property is invalid');
     }
     if (empty($this->type) || !array_key_exists($this->type, FileType::listData())) {
         throw new HttpException(500, 'Type property is invalid');
     }
 }
开发者ID:vfokov,项目名称:tims2,代码行数:13,代码来源:MediaPopup.php

示例5: map

 public static function map($view, $framework = null)
 {
     $key = self::getFramework($framework, 'map');
     if (in_array($key, array_keys(self::$_custom_frameworks))) {
         $class = self::$_custom_frameworks[$key]['class'];
         if (substr($class, 0, 1) != '\\') {
             $class = self::NS . $class;
         }
         $class::register($view);
     } else {
         parent::map($view, $framework);
     }
 }
开发者ID:elitedivision,项目名称:amos-core,代码行数:13,代码来源:AmosIcons.php

示例6: init

 public function init()
 {
     parent::init();
     Icon::map(Yii::$app->getView(), Icon::FA);
     Icon::map(Yii::$app->getView(), Icon::EL);
     Icon::map(Yii::$app->getView(), Icon::TYP);
     Icon::map(Yii::$app->getView(), Icon::WHHG);
     Icon::map(Yii::$app->getView(), Icon::JUI);
     Icon::map(Yii::$app->getView(), Icon::UNI);
     Icon::map(Yii::$app->getView(), Icon::SI);
     Icon::map(Yii::$app->getView(), Icon::OCT);
     Icon::map(Yii::$app->getView(), Icon::FI);
 }
开发者ID:pavlinter,项目名称:yii2-adm,代码行数:13,代码来源:AdmAsset.php

示例7: init

 public function init()
 {
     Icon::map($this->grid->getView());
     $this->registerTranslations();
     parent::init();
     // TODO: Change the autogenerated stub
     $this->value = function ($model, $key, $index, $widget) {
         $lockIcon = '';
         if ($this->showLock) {
             if ($model->hasAttribute('locked') && $model->{$model->lockedAttribute}) {
                 $lockIcon = Icon::show('eye-slash');
             } else {
                 $lockIcon = Icon::show('eye');
             }
         }
         return Html::a($lockIcon . $model->{$this->attribute}, ['update', 'id' => $model->id], ['title' => self::t('messages', 'Edit item')]);
     };
 }
开发者ID:sibds,项目名称:yii2-gridhelper,代码行数:18,代码来源:UrlColumn.php

示例8: init

 public function init()
 {
     parent::init();
     if ($this->formatter == null) {
         $this->formatter = Yii::$app->getFormatter();
     } elseif (is_array($this->formatter)) {
         $this->formatter = Yii::createObject($this->formatter);
     }
     if (!$this->formatter instanceof Formatter) {
         throw new InvalidConfigException('The "formatter" property must be either a Format object or a configuration array.');
     }
     // Load kartic icons
     Icon::map(Yii::$app->view);
     $this->registerAssets();
     if ($this->dataProvider === null) {
         throw new InvalidConfigException('The "dataProvider" property must be set.');
     }
     $this->modelClass = $this->dataProvider->getModels()[0]->className();
     $this->normalizeColumns();
 }
开发者ID:Jesuso,项目名称:yii2-widget-block-models,代码行数:20,代码来源:BlockModels.php

示例9:

<?php

use yii\helpers\Html;
use bupy7\cropbox\Cropbox;
use kartik\slider\Slider;
use kartik\icons\Icon;
Icon::map($this, Icon::FA);
?>
<div id="<?php 
echo $idWidget;
?>
" class="cropbox">
    <div class="imageBox">
        <div class="thumbBox"></div>
    </div>
    <p class="message"></p>
    <div class="btn-group">
        <span class="btn btn-primary btn-file">
            <?php 
echo Icon::show('folder-open') . Cropbox::t('Browse') . Html::activeFileInput($model, $attribute, $options);
?>
        </span>
        <?php 
echo Html::button(Icon::show('expand '), ['class' => 'btn btn-default btnZoomIn']);
echo Html::button(Icon::show('compress'), ['class' => 'btn btn-default btnZoomOut']);
echo Html::button(Icon::show('crop') . Cropbox::t('Crop'), ['class' => 'btn btn-success btnCrop']);
?>
    </div>
    <div class="form-horizontal">
        <div class="form-group resizeWidth">
            <label for="<?php 
开发者ID:kabiraparesh,项目名称:yii2-widget-cropbox,代码行数:31,代码来源:field.php

示例10: init

 public function init()
 {
     Icon::map(Yii::$app->getView(), Icon::FA);
     parent::init();
 }
开发者ID:pavlinter,项目名称:yii2-app-core,代码行数:5,代码来源:Asset.php

示例11:

<?php

/* @var $this \yii\web\View */
/* @var $content string */
use yii\helpers\Html;
use yii\bootstrap\Nav;
use yii\bootstrap\NavBar;
use yii\widgets\Breadcrumbs;
use frontend\assets\AppAsset;
use common\widgets\Alert;
use kartik\icons\Icon;
Icon::map($this);
// Maps the Elusive icon font framework
AppAsset::register($this);
$this->beginPage();
?>
<!DOCTYPE html>
<html lang="<?php 
echo Yii::$app->language;
?>
">
<head>
    <meta charset="<?php 
echo Yii::$app->charset;
?>
">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <link rel="shortcut icon" href="<?php 
echo Yii::$app->request->getBaseUrl();
?>
/img/favicon32.ico" type="image/x-icon">
开发者ID:hankypanky666,项目名称:sletay_new,代码行数:31,代码来源:main.php

示例12: function

<?php

use common\models\Scorecard;
use yii\helpers\Html;
use yii\helpers\Url;
use kartik\icons\Icon;
/* @var $this yii\web\View */
/* @var $searchModel common\models\CompetitionSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
Icon::map($this, Icon::WHHG);
$this->title = Yii::t('igolf', 'Competitions');
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="competition-index">

    <?php 
echo $this->render('_list', ['title' => Yii::t('igolf', 'Open Matches'), 'dataProvider' => $openProvider, 'filterModel' => $openSearch, 'actionButtons' => ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view}']]);
?>

    <?php 
echo $this->render('_list_tournaments', ['title' => Yii::t('igolf', 'Open Tournaments'), 'dataProvider' => $openTournamentProvider, 'filterModel' => $openTournamentSearch, 'actionButtons' => ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view} {leaderboard}', 'buttons' => ['leaderboard' => function ($url, $model) {
    $url = Url::to(['competition/leaderboard', 'id' => $model->id]);
    return Html::a(Icon::show('numberlist', [], Icon::WHHG), $url, ['title' => Yii::t('igolf', 'Leaderboard')]);
}]]]);
?>

    <?php 
echo $this->render('_list', ['title' => Yii::t('igolf', 'Matches Ready'), 'dataProvider' => $readyProvider, 'filterModel' => $readySearch, 'actionButtons' => ['class' => 'kartik\\grid\\ActionColumn', 'template' => '{view} {score} {scorecards} {leaderboard}', 'buttons' => ['score' => function ($url, $model) {
    $url = Url::to(['scorecard/competition', 'id' => $model->id]);
    return Html::a(Icon::show('golf', [], Icon::WHHG), $url, ['title' => Yii::t('igolf', 'Enter scores')]);
}, 'scorecards' => function ($url, $model) {
开发者ID:kleitz,项目名称:golfleague,代码行数:31,代码来源:index.php

示例13:

<?php

/**
 * @var $this yii\web\View
 * @var $dataProvider yii\data\ActiveDataProvider
 * @var $itemLayout string
 * @var $category null|\gromver\platform\common\models\Category
 * @var $listViewOptions array
 */
use kartik\icons\Icon;
Icon::map($this, Icon::EL);
echo \yii\helpers\Html::a(Icon::show('rss', [], Icon::EL), $category ? ['/grom/news/post/rss', 'category_id' => $category->id] : ['/grom/news/post/rss'], ['class' => 'btn btn-warning btn-xs pull-right']);
echo \yii\widgets\ListView::widget(array_merge(['dataProvider' => $dataProvider, 'itemView' => $itemLayout, 'summary' => '', 'viewParams' => ['postListWidget' => $this->context]], $this->context->listViewOptions));
开发者ID:gromver,项目名称:yii2-platform,代码行数:13,代码来源:listDefault.php

示例14: renderWidget

 /**
  * Renders the widget
  */
 protected function renderWidget()
 {
     if (!empty($this->ip)) {
         $this->api .= $this->ip;
     }
     if (empty($this->flagWrapperOptions['id'])) {
         $this->flagWrapperOptions['id'] = $this->options['id'] . '-flag';
     }
     $loadData = ArrayHelper::remove($this->loadingOptions, 'message', Yii::t('kvip', 'Fetching location info...'));
     $this->defaultFieldValues += ['flag' => '<i class="glyphicon glyphicon-question-sign text-warning"></i>', 'table' => '', 'country_code' => Yii::t('kvip', 'N.A.'), 'country_name' => Yii::t('kvip', 'Unknown'), 'ip' => '', 'region_code' => '', 'region_name' => '', 'city' => '', 'zip_code' => '', 'time_zone' => '', 'latitude' => '', 'longitude' => '', 'metro_code' => ''];
     $popoverButton = $popoverContent = $inlineContent = $flag = '';
     extract($this->template);
     if ($this->showFlag) {
         Icon::map($this->getView(), Icon::FI);
         if (empty($this->flagOptions['class'])) {
             $this->flagOptions['class'] = 'flag-icon';
         }
         $flag = Html::tag('span', $this->defaultFieldValues['flag'], $this->flagWrapperOptions);
     }
     foreach ($this->defaultFieldValues as $tag => $value) {
         if ($this->showPopover) {
             $popoverButton = $this->parseTag($popoverButton, $tag, $value, $flag, 'p');
             $popoverContent = $this->parseTag($popoverContent, $tag, $value, $flag, 'i');
         } else {
             $inlineContent = $this->parseTag($inlineContent, $tag, $value, $flag, 'i');
         }
     }
     $content = self::renderTag($loadData, $this->loadingOptions, 'div');
     if ($this->showPopover) {
         $header = isset($this->contentHeader) ? $this->contentHeader : Yii::t('kvip', 'IP Position Details');
         $this->popoverOptions['header'] = $this->contentHeaderIcon . $header;
         $popOpts = $this->popoverOptions;
         if (!isset($popOpts['toggleButton']) && !isset($popOpts['toggleButton']['class'])) {
             $this->popoverOptions['toggleButton']['class'] = 'kv-ipinfo-button';
         }
         $this->popoverOptions['toggleButton']['label'] = $popoverButton;
         $this->popoverOptions['content'] = self::renderTag($content . '<div class="kv-hide">' . $popoverContent . '</div>', $this->options);
         $content = PopoverX::widget($this->popoverOptions);
     } else {
         $content = self::renderTag($content . '<div class="kv-hide">' . $inlineContent . '</div>', $this->options);
     }
     $this->registerAssets();
     echo $content;
 }
开发者ID:kartik-v,项目名称:yii2-ipinfo,代码行数:47,代码来源:IpInfo.php

示例15:

<?php

use yii\helpers\Html;
use yii\widgets\DetailView;
use kartik\icons\Icon;
/* @var $this yii\web\View */
/* @var $model common\models\Players */
$this->title = $model->name . ' ' . $model->surname;
$this->params['breadcrumbs'][] = ['label' => 'Игроки', 'url' => ['/players']];
$this->params['breadcrumbs'][] = $this->title;
//Icon::FI;
Icon::map($this, Icon::FI);
$roleInfo = ['вр' => 'Вратарь', 'зщ' => 'Защитник', 'пз' => 'Полузащитник', 'нп' => 'Нападающий'];
?>

<div class="players-view well">
    <div class="row">
        <div class="col-xs-5 text-center player-img-block">
            <div class="player-img-box">
                <div class="player-number-img"><?php 
echo $model->number;
?>
</div>
                <?php 
$images = $model->getImage();
if ($images['urlAlias'] != 'placeHolder') {
    echo Html::img($images->getUrl('x400'), ['alt' => $model->name, 'class' => '']);
    //thumbnail img-responsive
}
?>
            </div>
开发者ID:kusma007,项目名称:one-advanced,代码行数:31,代码来源:view.php


注:本文中的kartik\icons\Icon::map方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。