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


PHP fontawesome\FA类代码示例

本文整理汇总了PHP中rmrevin\yii\fontawesome\FA的典型用法代码示例。如果您正苦于以下问题:PHP FA类的具体用法?PHP FA怎么用?PHP FA使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: actionIndex

 /**
  * Lists all StaticPageTable models.
  * @return mixed
  */
 public function actionIndex()
 {
     if (!Yii::$app->user->can('static-page-table/index')) {
         Yii::$app->session->setFlash('error', 'Нет доступа!');
         return $this->redirect('/');
     }
     if (isset($_POST['sort_list_2'])) {
         $mas = explode(',', $_POST['sort_list_2']);
         for ($i = 0; $i <= sizeof($mas) - 1; $i++) {
             $model = $this->findModel($mas[$i]);
             $model->position = $i;
             $model->save();
         }
     }
     $staticPagesTrue = StaticPageTable::find()->where(['status' => 1])->orderBy(['position' => SORT_ASC])->all();
     $staticPagesFalse = StaticPageTable::find()->where(['status' => 0])->orderBy(['position' => SORT_ASC])->all();
     $list = [];
     $value = "";
     foreach ($staticPagesTrue as $statispage) {
         $list[$statispage->id] = ['content' => Html::a(FA::icon($statispage->icon) . " " . $statispage->name, ['view', 'url' => $statispage->url])];
         $value .= $statispage->id . ",";
     }
     foreach ($staticPagesFalse as $statispage) {
         $list[$statispage->id] = ['content' => Html::a(FA::icon($statispage->icon) . " " . $statispage->name, ['view', 'url' => $statispage->url]), 'disabled' => true];
         $value .= $statispage->id . ",";
     }
     $value = substr($value, 0, -1);
     return $this->render('index', ['list' => $list, 'value' => $value]);
 }
开发者ID:dosh93,项目名称:shop,代码行数:33,代码来源:StaticPageTableController.php

示例2: init

 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     Html::addCssClass($this->options, ['widget' => 'info-box']);
     $iconOptions = ['class' => 'info-box-icon'];
     if ($this->type === self::COLORED_ICON) {
         Html::addCssClass($iconOptions, 'bg-' . $this->color);
     } else {
         Html::addCssClass($this->options, 'bg-' . $this->color);
     }
     echo Html::beginTag('div', $this->options);
     echo Html::tag('span', FA::icon($this->icon), $iconOptions);
     echo '<div class="info-box-content">';
     if (!empty($this->contents)) {
         foreach ($this->contents as $content) {
             if (is_array($content)) {
                 $type = ArrayHelper::getValue($content, 'type', 'text');
                 $text = ArrayHelper::getValue($content, 'text', '');
                 if (in_array($type, ['text', 'number'])) {
                     echo Html::tag('span', $text, ['class' => 'info-box-' . $type]);
                 } elseif ($type == 'progress') {
                     $value = ArrayHelper::getValue($content, 'value', $text);
                     echo '<div class="progress">';
                     echo Html::tag('div', '', ['class' => 'progress-bar', 'style' => ['width' => $value . '%']]);
                     echo '</div>';
                 } else {
                     echo Html::tag('span', $text, ['class' => $type]);
                 }
             } else {
                 echo $content;
             }
         }
     }
 }
开发者ID:WiconWang,项目名称:CS-Iris,代码行数:37,代码来源:InfoBox.php

示例3: createLabel

 /**
  * Creates the label for a button
  *
  * @return string the label
  */
 protected function createLabel()
 {
     $icon = empty($this->icon) ? '' : FA::icon($this->icon);
     if (empty($this->label) || strcmp($this->label, 'Button') === 0) {
         $label = '';
     } else {
         $label = Html::tag('span', $this->encodeLabel ? Html::encode($this->label) : $this->label);
     }
     return $icon . $label;
 }
开发者ID:highestgoodlikewater,项目名称:yii2-toolbox,代码行数:15,代码来源:Button.php

示例4: renderItem

/**
 * @param array|string $item
 * @return null|string
 */
function renderItem($item)
{
    $options = [];
    if (isset($item['visible']) && $item['visible'] !== true) {
        return null;
    }
    $anchor_options = [];
    if (!isset($item['items']) || empty($item['items'])) {
        $label = '';
        $subitems = '';
        if (isset($item['icon']) && !empty($item['icon'])) {
            $label .= $item['icon'] . ' ';
        }
        $label .= Html::tag('span', $item['label']);
        if (isset($item['badge'])) {
            if (!is_array($item['badge'])) {
                $item['badge'] = ['text' => $item['badge']];
            }
            $opt = ['class' => 'label pull-right'];
            if (isset($item['badge']['class'])) {
                Html::addCssClass($opt, $item['badge']['class']);
            }
            $label .= ' ' . Html::tag('small', $item['badge']['text'], $opt);
        }
    } else {
        $label = '';
        $subitems = '';
        if (isset($item['icon']) && !empty($item['icon'])) {
            $label .= $item['icon'] . ' ';
        }
        $label .= Html::tag('span', $item['label']) . FA::icon('angle-left')->pullRight();
        foreach ($item['items'] as $subitem) {
            $subitems .= renderItem($subitem);
        }
        $opt = ['class' => 'treeview-menu'];
        if (true === $item['selected']) {
            Html::addCssClass($opt, 'menu-open');
        }
        $subitems = Html::tag('ul', $subitems, $opt);
        Html::addCssClass($options, 'treeview');
    }
    if (true === $item['selected']) {
        Html::addCssClass($options, 'active');
    }
    return Html::tag('li', Html::a($label, $item['url'], $anchor_options) . $subitems, $options);
}
开发者ID:cookyii,项目名称:project,代码行数:50,代码来源:_menu.php

示例5: initDefaultButtons

 protected function initDefaultButtons()
 {
     //        $this->template = '<div class="btn-group">' . $this->template . '</div>';
     if (!isset($this->buttons['view'])) {
         $this->buttons['view'] = function ($url, $model, $key) {
             return Html::a(FA::i('eye'), $url, array_merge(['title' => Yii::t('yii', 'View'), 'class' => 'btn btn-default btn-xs'], $this->buttonOptions));
         };
     }
     if (!isset($this->buttons['update'])) {
         $this->buttons['update'] = function ($url, $model, $key) {
             return Html::a(FA::i('edit'), $url, array_merge(['title' => Yii::t('yii', 'Update'), 'class' => 'btn btn-primary btn-xs'], $this->buttonOptions));
         };
     }
     if (!isset($this->buttons['delete'])) {
         $this->buttons['delete'] = function ($url, $model, $key) {
             return Html::a(FA::i('trash'), $url, array_merge(['title' => Yii::t('yii', 'Delete'), 'class' => 'btn btn-danger btn-xs', 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post'], $this->buttonOptions));
         };
     }
 }
开发者ID:CyanoFresh,项目名称:SelectPhoto,代码行数:19,代码来源:ActionButtonGroupColumn.php

示例6: getMenuItems

 public function getMenuItems()
 {
     return [['label' => ($this->_model ? FA::icon(FA::_EDIT) : FA::icon(FA::_PLUS_SQUARE)) . ' <b>' . $this->generateKey() . '</b> <span class="label label-danger">HTML</span>', 'url' => $this->_model ? $this->generateEditRoute($this->_model->id) : $this->generateCreateRoute()]];
 }
开发者ID:dmstr,项目名称:yii2-prototype-module,代码行数:4,代码来源:HtmlWidget.php

示例7:

            <div class="col-lg-3">
                <h2><?php 
echo FA::icon('youtube-play');
?>
 Видео</h2>

                <p>Вставка видео на главной странице и описания к нему</p>

                <p><a class="btn btn-primary" href="<?php 
echo Url::to(['/admin/video']);
?>
">Начать &raquo;</a></p>
            </div>
            <div class="col-lg-3">
                <h2><?php 
echo FA::icon('floppy-o');
?>
 Релизы</h2>

                <p>Добавление и редактирование вышедших релизов для отображения на странице /releases</p>

                <p><a class="btn btn-primary" href="<?php 
echo Url::to(['/admin/release']);
?>
">Начать &raquo;</a></p>
            </div>
        </div>

    </div>
</div>
开发者ID:spinybeast,项目名称:lolipops,代码行数:30,代码来源:index.php

示例8: menu

 /**
  * @inheritdoc
  */
 public function menu($Controller)
 {
     return [['label' => \Yii::t('cookyii.feed', 'Feeds'), 'url' => ['/feed/list/index'], 'icon' => FA::icon('bars'), 'visible' => User()->can(Feed\backend\Permissions::ACCESS), 'selected' => $Controller->module->id === 'feed', 'sort' => 1000]];
 }
开发者ID:cookyii,项目名称:module-feed,代码行数:7,代码来源:Module.php

示例9: menu

 /**
  * @inheritdoc
  */
 public function menu($Controller)
 {
     return [['label' => \Yii::t('cookyii.translation', 'Translation'), 'url' => ['/translation/list/index'], 'icon' => FA::icon('globe'), 'visible' => User()->can(Permissions::ACCESS), 'selected' => $Controller->module->id === 'translation', 'sort' => 9000]];
 }
开发者ID:cookyii,项目名称:module-translation,代码行数:7,代码来源:Module.php

示例10: function

/** @var \backend\modules\announcements\models\AnnouncementForm $model */
use rmrevin\yii\fontawesome\FA;
use yii\bootstrap\Html;
$this->title = 'Редактирование анонса';
$this->params['breadcrumbs'][] = ['url' => ['/announcements/default/index'], 'label' => 'Анонсы'];
$this->params['breadcrumbs'][] = $this->title;
$js = <<<'JS'
$("body").on('click', '.saveBtn', function(){
    $("#edit-announcement-form").submit();
});
JS;
$this->registerJs($js);
?>
<div class="panel panel-default">
    <div class="panel-heading">
        <?php 
echo Html::a(FA::i('arrow-left') . Html::tag('small', 'Назад'), ['/announcements'], ['class' => 'btn btn-app']);
?>
        <?php 
echo Html::button(FA::i('save') . Html::tag('small', 'Сохранить'), ['class' => 'btn btn-app saveBtn']);
?>
    </div>
    <div class="panel-body">
        <div class="col-xs-8 col-xs-offset-2">
            <?php 
echo $this->render('editForm', ['model' => $model]);
?>
        </div>
    </div>
</div>
开发者ID:BoBRoID,项目名称:new.k-z,代码行数:30,代码来源:edit.php

示例11: date

                <div class="divider mt2 mb1"></div>
                <ul>
                    <li class="inline mr1"><a href="#!" class="grey-text text-lighten-1"><?php 
echo FA::icon('vk')->size(FA::SIZE_2X);
?>
</a></li>
                    <li class="inline mr1"><a href="#!" class="grey-text text-lighten-1"><?php 
echo FA::icon('google-plus')->size(FA::SIZE_2X);
?>
</a></li>
                    <li class="inline mr1"><a href="#!" class="grey-text text-lighten-1"><?php 
echo FA::icon('twitter')->size(FA::SIZE_2X);
?>
</a></li>
                    <li class="inline mr1"><a href="mailto::info@tc-alpha.ru" class="grey-text text-lighten-1"><?php 
echo FA::icon('envelope')->size(FA::SIZE_2X);
?>
</a></li>
                </ul>
            </div>
        </div>
    </div>
    <div class="footer-copyright">
        <div class="container p0 grey-text text-darken-1 center-align">
            &copy; <?php 
echo date('Y');
?>
 Торговый дом "Альфа"
        </div>
    </div>
</footer>
开发者ID:Alpha-Hydro,项目名称:tc-alpha,代码行数:31,代码来源:_footer.php

示例12: date

                            <li><?php 
echo Html::a('Отзывы о проекте ' . FA::icon('book'), ['/site/review']);
?>
</li>
                            <li><?php 
echo Html::a('Обратная связь <span class="glyphicon glyphicon-envelope">', ['/feedback/create']);
?>
</li>
                        </ul>
                    </span>
            <span class="pull-right copy">&copy; Dosh <?php 
echo date('Y');
?>
</span>
        </div>
    </footer>

    <div id="scrollup">
        <span class="scrollup">Наверх <?php 
echo FA::icon('arrow-up ');
?>
</span>
    </div>

<?php 
$this->endBody();
?>
</body>
</html>
<?php 
$this->endPage();
开发者ID:dosh93,项目名称:shop,代码行数:31,代码来源:main.php

示例13:

        <h2 class="text-center">
            Вход<small> (<?php 
echo Html::a('зарегистрироваться', ['/site/reg']);
?>
)</small>
        </h2>
        <div class="col-md-6 col-md-offset-3">
            <?php 
$form = ActiveForm::begin();
?>

            <?php 
echo $form->field($model, 'username', ['addon' => ['prepend' => ['content' => \rmrevin\yii\fontawesome\FA::icon('user')]]]);
?>
            <?php 
echo $form->field($model, 'password', ['addon' => ['prepend' => ['content' => \rmrevin\yii\fontawesome\FA::icon('key')]]])->passwordInput();
?>

            <?php 
echo $form->field($model, 'rememberMe')->checkbox();
?>
            <?php 
echo Html::a('Забыли пароль?', ['site/send-email']);
?>

            <div class="form-group">
                <div class="text-centre">
                    <?php 
echo Html::submitButton('Войти', ['class' => 'btn btn-primary btn-block']);
?>
                </div>
开发者ID:dosh93,项目名称:shop,代码行数:31,代码来源:login.php

示例14: renderItem

 /**
  * Renders a widget's item.
  * @param string|array $item the item to render.
  * @return string the rendering result.
  * @throws InvalidConfigException
  */
 public function renderItem($item)
 {
     if (is_string($item)) {
         return $item;
     }
     if (!isset($item['label']) && !isset($item['icon'])) {
         throw new InvalidConfigException("The 'label' option is required.");
     }
     $encodeLabel = isset($item['encode']) ? $item['encode'] : $this->encodeLabels;
     $label = ArrayHelper::getValue($item, 'label', '');
     if ($encodeLabel) {
         $label = Html::encode($label);
     }
     $icon = ArrayHelper::getValue($item, 'icon');
     if ($icon) {
         $label = FA::icon($icon) . ' ' . $label;
     }
     $badge = ArrayHelper::getValue($item, 'badge');
     if (!empty($badge)) {
         $badgeColor = ArrayHelper::getValue($item, 'badgeColor', 'red');
         $label .= ' ' . Html::tag('small', $badge, ['class' => 'badge pull-right bg-' . $badgeColor]);
     }
     $options = ArrayHelper::getValue($item, 'options', []);
     $items = ArrayHelper::getValue($item, 'items');
     $url = ArrayHelper::getValue($item, 'url', '#');
     $linkOptions = ArrayHelper::getValue($item, 'linkOptions', []);
     if (isset($item['active'])) {
         $active = ArrayHelper::remove($item, 'active', false);
     } else {
         $active = $this->isItemActive($item);
     }
     if ($items !== null) {
         Html::addCssClass($options, ['widget' => 'treeview']);
         if ($this->treeviewCaret !== '') {
             $label .= ' ' . $this->treeviewCaret;
         }
         if (is_array($items)) {
             if ($this->activateItems) {
                 $items = $this->isChildActive($items, $active);
             }
             $items = $this->renderItems($items, ['class' => 'treeview-menu']);
         }
     }
     if ($this->activateItems && $active) {
         Html::addCssClass($options, 'active');
     }
     return Html::tag('li', Html::a($label, $url, $linkOptions) . $items, $options);
 }
开发者ID:WiconWang,项目名称:CS-Iris,代码行数:54,代码来源:SideNav.php

示例15:

</script>

<script type="text/ng-template" id="toast-warning.html">
    <md-toast class="warning">
        <span flex>
            <?php 
echo FA::icon('exclamation-triangle')->fixedWidth();
?>
            <strong ng-show="false">{{ message.title }}<br></strong>
            <span>{{ message.text }}</span>
        </span>
        <md-button ng-click="resolve()" class="md-action">
            {{ action }}
        </md-button>
    </md-toast>
</script>

<script type="text/ng-template" id="toast-danger.html">
    <md-toast class="danger">
        <span flex>
            <?php 
echo FA::icon('times')->fixedWidth();
?>
            <strong ng-show="false">{{ message.title }}<br></strong>
            <span>{{ message.text }}</span>
        </span>
        <md-button ng-click="resolve()" class="md-action">
            {{ action }}
        </md-button>
    </md-toast>
</script>
开发者ID:rmrevin,项目名称:yii2-application,代码行数:31,代码来源:_toast.php


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