承接 ovidiupop/yii2-adminlte3 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ovidiupop/yii2-adminlte3

最新稳定版本:v1.0

Composer 安装命令:

composer require ovidiupop/yii2-adminlte3

包简介

adminlte3 for yii2

README 文档

README

adminlte3 for yii2

home

Installation

The preferred way to install this extension is through composer.

Add to the require section of your composer.json file.

"ovidiupop/yii2-adminlte3": "~1.0"

Usage

Once the extension is installed, you can config the path mappings of the view component:

'components' => [
    'view' => [
         'theme' => [
             'pathMap' => [
                '@app/views' => '@vendor/ovidiupop/yii2-adminlte3/src/views'
             ],
         ],
    ],
],

Copy files from @vendor/ovidiupop/yii2-adminlte3/src/views to @app/views, then edit.

simply use:

<?= \ovidiupop\adminlte\widgets\Alert::widget([
    'type' => 'success',
    'body' => '<h3>Congratulations!</h3>'
]) ?>

more for widgets

AdminLTE Plugins

AdminLTE Plugins are not included in AdminLteAsset, if you want to use any of them you can add it dynamically with PluginAsset. For example:

/* @var $this \yii\web\View */

\ovidiupop\adminlte3\assets\PluginAsset::register($this)->add('sweetalert2');

// or
\ovidiupop\adminlte3\assets\PluginAsset::register($this)->add(['sweetalert2', 'toastr']);

before this, maybe you should edit params.php:

return [
    'adminEmail' => 'admin@example.com',
    'ovidiupop/yii2-adminlte3' => [
        'pluginMap' => [
            'sweetalert2' => [
                'css' => 'sweetalert2-theme-bootstrap-4/bootstrap-4.min.css',
                'js' => 'sweetalert2/sweetalert2.min.js'
            ],
            'toastr' => [
                'css' => ['toastr/toastr.min.css'],
                'js' => ['toastr/toastr.min.js']
            ],
        ]
    ]
];

or

/* @var $this \yii\web\View */

$bundle = \ovidiupop\adminlte3\assets\PluginAsset::register($this);
$bundle->css[] = 'sweetalert2-theme-bootstrap-4/bootstrap-4.min.css';
$bundle->js[] = 'sweetalert2/sweetalert2.min.js';

Gii

Now you need to tell Gii about out template. The setting is made in the config file.

// config/main-local.php for advanced app
if (!YII_ENV_TEST) {
    $config['modules']['gii'] = [
        'class' => 'yii\gii\Module',
        'generators' => [ // here
            'crud' => [ // generator name
                'class' => 'yii\gii\generators\crud\Generator', // generator class
                'templates' => [ // setting for our templates
                    'yii2-adminlte3' => '@vendor/ovidiupop/yii2-adminlte3/src/gii/generators/crud/default' // template name => path to template
                ]
            ]
        ]
    ];
}

Open the CRUD generator and you will see that in the field Code Template of form appeared own template.

统计信息

  • 总下载量: 4
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2023-12-12

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固