yidas / yii2-adminlte
AdminLTE Asset Bundle for Yii2 Framework
Installs: 17 109
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 4
Open Issues: 0
Type:yii2-extension
Requires
- almasaeed2010/adminlte: ~2.4
- yidas/yii2-fontawesome: 2.0.*
- yiisoft/yii2: 2.0.*
- yiisoft/yii2-bootstrap: ~2.0.0
README
AdminLTE Extension for Yii 2
AdminLTE Asset Bundle for Yii2 Framework
This is the AdminLTE extension for Yii framework 2.0. It encapsulates AdminLTE distribution assets and thus makes using AdminLTE in Yii applications extremely easy.
DEMONSTRATION
INSTALLATION
The preferred install way is through Composer:
composer require yidas/yii2-adminlte
Or you could also edit composer.json
with adding package in require section then run composer update
.
"yidas/yii2-adminlte": "~2.1.0"
CONFIGURATION
Register or depend Asset into your application:
yidas\adminlte\AdminlteAsset
For eaxmple, to register AdminLTE assets in view :
\yidas\adminlte\AdminlteAsset::register($this);
Or as dependency in your app asset bundle :
namespace app\assets; use yii\web\AssetBundle; class AppAsset extends AssetBundle { public $basePath = '@webroot'; public $baseUrl = '@web'; public $css = [ 'css/site.css', ]; public $js = [ ]; public $depends = [ 'yidas\adminlte\AdminlteAsset' ]; }
CUSTOMIZATION
Skin
Configurate asset in config
file:
'components' => [ 'assetManager' => [ 'bundles' => [ 'yidas\adminlte\AdminlteAsset' => [ 'skin' => 'skin-black', ], ], ], ],
USAGE
Version Control
Update dependent packages
composer update yidas/yii2-adminlte
Update newest AdminLTE version
composer update almasaeed2010/AdminLTE
Specify a AdminLTE version
composer require almasaeed2010/AdminLTE 2.4.0
PLUGINS
This package provides asset bundles of AdminLTE plugins:
iCheck
Register or depend Asset into your application:
yidas\yii2\adminlte\plugins\iCheckAsset
You could additionally register AdminLTE iCheck assets in view:
\yidas\yii2\adminlte\plugins\iCheckAsset::register($this);
Skin
'components' => [ 'assetManager' => [ 'bundles' => [ 'yidas\yii2\adminlte\plugins\iCheckAsset' => [ 'skin' => 'flat/aero', ], ], ], ],
TEMPLATES
Once the extension is installed, you can have a preview by reconfiguring the path mappings of the view component in config:
'components' => [ 'view' => [ 'theme' => [ 'pathMap' => [ '@app/views' => '@vendor/yidas/yii2-adminlte/templates/example' ], ], ], ],
Support both Yii 2 Advanced Application Template or Basic Application Template.
Example Templates
There are several implemented examples of AdminLTE layout for startup.
'@app/views' => '@vendor/yidas/yii2-adminlte/templates/simple'
'@app/views' => '@vendor/yidas/yii2-adminlte/templates/simple_zh-TW'