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


PHP Resource::getAdminUrl方法代码示例

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


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

示例1: initDefaultButtons

 protected function initDefaultButtons()
 {
     if (!isset($this->buttons['view'])) {
         $this->buttons['view'] = function ($url, $model, $key, $index, $gridView) {
             return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/magnifier.png">', $url, ['title' => Yii::t('yii', 'View'), 'data-pjax' => '0']);
         };
     }
     if (!isset($this->buttons['update'])) {
         $this->buttons['update'] = function ($url, $model, $key, $index, $gridView) {
             return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/pencil.png">', $url, ['title' => Yii::t('yii', 'Update'), 'data-pjax' => '0']);
         };
     }
     if (!isset($this->buttons['delete'])) {
         $this->buttons['delete'] = function ($url, $model, $key, $index, $gridView) {
             return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/cross.png">', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
         };
     }
 }
开发者ID:ruzuojun,项目名称:lulucms2,代码行数:18,代码来源:ActionColumn.php

示例2: getAdminMenu

 public static function getAdminMenu()
 {
     $html = '';
     $adminUrl = Resource::getAdminUrl();
     $action = LuLu::getApp()->requestedAction;
     $urlArray = explode('/', $action->uniqueId);
     $roots = self::getChildren('admin', 0, 1);
     foreach ($roots as $menu) {
         $url = $menu['url'] === '#' ? '#' : Url::to([$menu['url']]);
         $title = '<span class="da-nav-icon"><img src="' . $adminUrl . '/images/icons/black/32/' . $menu['thumb'] . '" alt="' . $menu['name'] . '" /></span>' . $menu['name'];
         $html .= '<li id="menu-item-' . $menu['id'] . '"><a href="' . $url . '">' . $title . '</a>';
         $children = self::getChildren('admin', $menu['id'], 1);
         if (count($children) > 0) {
             $opened = false;
             $childHtml = '';
             foreach ($children as $child) {
                 $menuUrlArray = explode('/', trim($child['url'], '/'));
                 if (in_array($urlArray[0], $menuUrlArray)) {
                     $opened = true;
                 }
                 $childUrl = $child['url'] === '#' ? '#' : Url::to([$child['url']]);
                 $childHtml .= '<li id="menu-item-' . $child['id'] . '"><a href="' . $childUrl . '">' . $child['name'] . '</a></li>';
             }
             $html .= $opened ? '<ul>' : '<ul class="closed">';
             $html .= $childHtml;
             $html .= '</ul>';
         }
         $html .= '</li>';
     }
     return $html;
 }
开发者ID:hucongyang,项目名称:lulucms2,代码行数:31,代码来源:Menu.php

示例3: function

use source\LuLu;
use source\modules\rbac\models\Role;
use source\libs\Resource;
/* @var $this yii\web\View */
/* @var $searchModel app\modules\rbac\models\search\RoleSearch */
/* @var $dataProvider yii\data\ActiveDataProvider */
$categoryId = LuLu::getGetValue('category');
$this->title = '角色管理';
$this->params['breadcrumbs'][] = $this->title;
$columns = [['attribute' => 'id', 'width' => '120px;'], ['attribute' => 'name', 'width' => '120px;'], ['attribute' => 'description', 'width' => 'auto'], ['class' => 'source\\core\\grid\\ActionColumn', 'template' => '{permission}{update} {delete}', 'buttons' => ['permission' => function ($url, $model) {
    return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/key.png">', Url::to(['relation', 'role' => $model['id']]), ['title' => '设置权限']);
}, 'delete' => function ($url, $model) {
    if ($model->is_system) {
        return '';
    }
    return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/cross.png">', $url, ['title' => Yii::t('yii', 'Delete'), 'data-confirm' => Yii::t('yii', 'Are you sure you want to delete this item?'), 'data-method' => 'post', 'data-pjax' => '0']);
}]]];
?>

<?php 
$this->toolbars([Html::a('新建', ['create', 'category' => $categoryId], ['class' => 'btn btn-xs btn-primary mod-site-save'])]);
?>

<style>
.ui-tabs .ui-tabs-panel{padding:0px;}
</style>
    <div class="da-ex-tabs">
        <ul>
            <li><a href="#tabs-<?php 
echo Role::Category_Member;
?>
开发者ID:ruzuojun,项目名称:lulucms2,代码行数:31,代码来源:index.php

示例4:

                </div>

                <!-- Main Content Wrapper -->
                <div id="da-content-wrap" class="clearfix">

                    <!-- Content Area -->
                    <div id="da-content-area">
                        <?php 
if (LuLu::getViewParam('defaultLayout') === null) {
    ?>
                        <div class="grid_4">
                            <div class="da-panel">
                                <div class="da-panel-header">
                                    <span class="da-panel-title">
                                        <img src="<?php 
    echo Resource::getAdminUrl();
    ?>
/images/icons/black/16/pencil.png" alt="">
                                        <?php 
    echo $this->title;
    ?>
                                    </span>


                                </div>
                                <?php 
    if (($toolbars = LuLu::getViewParam('toolbars')) !== null) {
        ?>
                                <div class="da-panel-toolbar top">
                                    <ul>
                                        <?php 
开发者ID:qq443140816,项目名称:lulucms2,代码行数:31,代码来源:main+-+Copy.php

示例5: function

<?php

use yii\helpers\Html;
use yii\helpers\Url;
use source\LuLu;
use source\libs\Constants;
use source\core\grid\GridView;
use source\modules\fragment\models\Fragment;
use source\libs\Resource;
/* @var $this source\core\back\BackView */
/* @var $searchModel source\modules\fragment\models\search\FragmentSearch */
/* @var $dataProvider source\core\data\ActiveDataProvider */
$type = LuLu::getGetValue('type');
$this->title = Fragment::getTypeItems($type);
$this->params['breadcrumbs'][] = $this->title;
$this->toolbars([Html::a('新建', ['create', 'type' => $type], ['class' => 'btn btn-xs btn-primary mod-site-save'])]);
?>
 

    <?php 
echo GridView::widget(['dataProvider' => $dataProvider, 'columns' => [['class' => 'source\\core\\grid\\IdColumn'], 'code', ['attribute' => 'name', 'width' => '250px', 'value' => function ($model, $key, $index, $column) {
    $indexUrl = Url::to(['fragment' . $model->type . '-data/index', 'fid' => $model->id, 'type' => $model->type]);
    return Html::a($model->name, $indexUrl);
}], ['attribute' => 'description', 'width' => 'auto'], ['class' => 'source\\core\\grid\\ActionColumn', 'width' => '60px', 'template' => '{data-create}{update} {delete}', 'buttons' => ['data-create' => function ($url, $model, $key, $index, $gridView) {
    $addUrl = Url::to(['fragment' . $model->type . '-data/create', 'fid' => $model->id, 'type' => $model->type]);
    return Html::a('<img src="' . Resource::getAdminUrl() . '/images/icons/color/text_signature.png">', $addUrl, ['title' => '添加内容']);
}]]]]);
?>


开发者ID:sym660,项目名称:lulucms2,代码行数:28,代码来源:index.php

示例6: registerJsFile

 /**
  * 向视图中注册默认的js资源
  * @param type $jsFile
  */
 public static function registerJsFile($jsFile)
 {
     $jsUrl = Resource::getAdminUrl($jsFile);
     LsYii::getView()->registerJsFile($jsUrl, ['depends' => 'yii\\web\\YiiAsset']);
 }
开发者ID:liuwz465501235,项目名称:lscms,代码行数:9,代码来源:AppAsset.php

示例7:

<?php

use source\LsYii;
use source\helpers\Html;
use source\core\widgets\ActiveForm;
use source\libs\Constants;
use source\libs\Resource;
use source\modules\menu\models\Menu;
use source\helpers\Url;
use backend\assets\AppAsset;
/* @var $this yii\web\View */
/* @var $model common\models\Menu */
/* @var $form yii\widgets\ActiveForm */
$this->registerJsFile(Resource::getAdminUrl('/default/js/bootstrap-smartsearch.js'), ['depends' => 'yii\\web\\YiiAsset']);
?>

<div class="menu-form">

    <?php 
$form = ActiveForm::begin(['id' => 'menu-form', 'options' => ['class' => 'form-horizontal']]);
?>
    <?php 
$disabeld = $model->isNewRecord ? false : true;
?>
    <?php 
echo $form->field($model, 'pid')->textInput(['class' => 'form-control', 'autocomplete' => 'off', 'data-provide' => "smartsearch", 'data-items' => "all", 'data-source' => Menu::getToJson(), 'data-value' => $model->pid, 'disabled' => $disabeld]);
?>

    <?php 
echo $form->field($model, 'name')->textInput(['maxlength' => true]);
?>
开发者ID:liuwz465501235,项目名称:lscms,代码行数:31,代码来源:_form.php

示例8:

        <div class="mod-header-user">
            <ul class="pull-right">

                <li class="dropdown">
                    <a href="#" class="dropdown-toggle mod-bell" data-toggle="dropdown">
                        <i class="icon icon-bell"></i>
                    </a>
                    <ul class="dropdown-menu mod-chat">
                        <p>没有通知</p>
                    </ul>
                </li>

                <li class="dropdown username">
                    <a href="" class="dropdown-toggle" data-toggle="dropdown">
                        <img src="<?php echo Resource::getAdminUrl('/images/avatar-mid-img.png')?>" class="img-circle" width="30">
                        admin888                    <span class="caret"></span>
                    </a>

                    <ul class="dropdown-menu pull-right mod-user">
                        <li>
                            <a href="<?php echo LuLu::getAlias('@web');?>" target="_blank"><i class="icon icon-home"></i>首页</a>
                        </li>

                        <li>
                            <?php echo Html::a('<i class="icon icon-ul"></i>概述',['/site/welcome'],['target'=>'mainFrame'])?>
                        </li>

                        <li>
                            <?php echo Html::a('<i class="icon icon-logout"></i>退出',['/site/logout'],['target'=>'mainFrame'])?>
                        </li>
开发者ID:huasxin,项目名称:lulucms2,代码行数:30,代码来源:container.php

示例9:

        <div class="mod-header-user">
            <ul class="pull-right">

                <li class="dropdown">
                    <a href="#" class="dropdown-toggle mod-bell" data-toggle="dropdown">
                        <i class="icon icon-bell"></i>
                    </a>
                    <ul class="dropdown-menu mod-chat">
                        <p>没有通知</p>
                    </ul>
                </li>

                <li class="dropdown username">
                    <a href="" class="dropdown-toggle" data-toggle="dropdown">
                        <img src="<?php 
echo Resource::getAdminUrl('/images/avatar-mid-img.png');
?>
" class="img-circle" width="30">
                        admin888                    <span class="caret"></span>
                    </a>

                    <ul class="dropdown-menu pull-right mod-user">
                        <li>
                            <a href="<?php 
echo LuLu::getAlias('@web');
?>
" target="_blank"><i class="icon icon-home"></i>首页</a>
                        </li>

                        <li>
                            <a href="<?php 
开发者ID:merlinxie,项目名称:lulublog,代码行数:31,代码来源:main.php


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