devnullius/yii2-admin-lte
Composer 安装命令:
composer require devnullius/yii2-admin-lte
包简介
Extension for adminLTE3 theme quick usage
README 文档
README
adminlte3 for yii2
https://adminlte.io/themes/v3/
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist devnullius/yii2-admin-lte "^1.0.0"
or add
"devnullius/yii2-admin-lte": "^1.0.0"
to the require section of your composer.json file.
Usage
Once the extension is installed, you can config the path mappings of the view component:
'components' => [ 'view' => [ 'theme' => [ 'pathMap' => [ '@app/views' => '@vendor/devnullius/yii2-admin-lte/src/views' ], ], ], ],
Copy files from @vendor/devnullius/adminlte/src/views to @app/views, then edit.
simply use:
<?php use devnullius\adminlte\widgets\Alert; ?> <?= Alert::widget([ 'type' => 'success', 'body' => '<h3>Congratulations!</h3>' ]) ?>
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 View */ use devnullius\adminlte\assets\PluginAsset; PluginAsset::register($this)->add('sweetalert2');
before this, maybe you should edit params.php:
return [ 'adminEmail' => 'admin@example.com', 'devnullius.adminlte' => [ 'pluginMap' => [ 'sweetalert2' => [ 'css' => 'sweetalert2-theme-bootstrap-4/bootstrap-4.min.css', 'js' => 'sweetalert2/sweetalert2.min.js' ] ] ] ];
or
/* @var $this View */ use devnullius\adminlte\assets\PluginAsset; $bundle = PluginAsset::register($this); $bundle->css[] = 'sweetalert2-theme-bootstrap-4/bootstrap-4.min.css'; $bundle->js[] = 'sweetalert2/sweetalert2.min.js';
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 2
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-09-17