本文整理汇总了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();
}
示例2: init
public function init()
{
$this->registerTranslations();
Icon::map($this->grid->getView(), Icon::FA);
parent::init();
// TODO: Change the autogenerated stub
}
示例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());
}
示例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');
}
}
示例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);
}
}
示例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);
}
示例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')]);
};
}
示例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();
}
示例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
示例10: init
public function init()
{
Icon::map(Yii::$app->getView(), Icon::FA);
parent::init();
}
示例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">
示例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) {
示例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));
示例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;
}
示例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>