cinghie / yii2-admin-lte
Asset Bundle to include AdminLTE on your Yii 2 project
Package info
github.com/cinghie/yii2-admin-lte
Type:yii2-extension
pkg:composer/cinghie/yii2-admin-lte
Requires
- php: >=8.0
- almasaeed2010/adminlte: ^2.4.18
- cinghie/yii2-animate: ^1.0.2
- cinghie/yii2-fontawesome: ^1.4.4
- cinghie/yii2-traits: ^1.3.0
- yiisoft/yii2: ~2.0.14
- yiisoft/yii2-bootstrap: ~2.0.0
Requires (Dev)
- phpunit/phpunit: ^9.5 || ^10.0 || ^11.0
- roave/security-advisories: dev-latest
Suggests
- kartik-v/yii2-grid: Required for Box grid mode and the AdminLTE GridView widget
This package is auto-updated.
Last update: 2026-08-23 22:10:29 UTC
README
Project docs: README · UPDATE roadmap · CHANGELOG · MIT License
Warning
Legacy package
This package is based on AdminLTE 2.x, which is no longer actively maintained upstream.
The package is therefore considered legacy and is maintained primarily for existing Yii 2 applications that still depend on AdminLTE 2.
For new projects, consider using a solution based on AdminLTE 3 / Bootstrap 4 or newer: https://github.com/cinghie/yii2-adminlte3/
No migration to a newer AdminLTE major version is currently planned, as such a change would require significant backwards-incompatible changes.
Asset Bundle to include AdminLTE on your Yii 2 project: https://github.com/almasaeed2010/AdminLTE/
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require cinghie/yii2-admin-lte "^1.6.0"
or add this line to the require section of your composer.json file.
"cinghie/yii2-admin-lte": "^1.6.0"
Development branch compatibility
The current master branch requires PHP 8.1+ and is tested on PHP 8.1, 8.2, 8.3, 8.4 and 8.5.
The Cinghie package family intentionally tracks development branches where required by the project (dev-main for yii2-animate, dev-master for yii2-fontawesome and yii2-traits). Composer therefore uses minimum-stability: dev together with prefer-stable: true, allowing those explicit development constraints while still preferring stable versions for other dependencies when possible.
Configuration
Add in the view for normal CSS and JS
use cinghie\adminlte\AdminLTEAsset;
AdminLTEAsset::register($this);
Add in the view for minify CSS and JS
use cinghie\adminlte\AdminLTEMinifyAsset;
AdminLTEMinifyAsset::register($this);
Reusable input widgets
Bootstrap 3/AdminLTE 2 applications can reuse the package-owned input widgets without depending on a feature module such as yii2-events:
use cinghie\adminlte\widgets\ColorPicker; use cinghie\adminlte\widgets\DatePicker; use cinghie\adminlte\widgets\DateTimePicker; $form->field($model, 'color')->widget(ColorPicker::class); $form->field($model, 'date')->widget(DatePicker::class); $form->field($model, 'starts_at')->widget(DateTimePicker::class);
ColorPicker is self-contained: it keeps the HEX value as the submitted field, validates palette entries before using them in inline styles, and registers its shared CSS/JavaScript only once per page. DatePicker and DateTimePicker wrap Kartik's Bootstrap 3 date/time implementation; kartik-v/yii2-widgets is therefore a runtime dependency so these exported widgets work immediately for clean consumers. Package defaults remain overridable through normal Yii widget configuration.
Widgets Examples
Accordion — Bootstrap 3 collapsible panels with contextual AdminLTE styles and safe content defaults.
Alert
Box
Calendar — FullCalendar 3 integration with Yii route URLs, locale bundle, dedicated assets, print support and optional AdminLTE draggable events.
Carousel — Bootstrap 3 carousel with indicators, controls and safe slide/caption defaults.
ColorPicker — reusable deferred HEX/palette input with strict palette validation and shared client assets.
DatePicker — reusable date-only picker with overridable defaults.
DateTimePicker — reusable date/time picker with overridable defaults.
Content Header
DataColumn
Footer
GridView
Invoice — encoded AdminLTE invoice rendering with hardened URL and email handling.
Mailbox Read
Navbar Button
Navbar Logo
Navbar User
Sidebar Menu
Sidebar Search
Sidebar Toggle
Sidebar User
Simplebox
Timeline
Tests
composer test
# or
vendor/bin/phpunit -c tests/phpunit.xml
GitHub Actions validates Composer metadata, resolves the full dependency graph and runs PHPUnit on PHP 8.1 through 8.5.
The suite covers Yii2 best practices (widgets/assets/use imports), Calendar integration and URL/color hardening, Carousel/Accordion rendering and input hardening, Invoice encoding/email/action safety, Box content/grid modes, reusable input-widget behavior and configuration overrides, and smoke tests for Alert / Simplebox / Footer / Navbar / Sidebar widgets.
Maintenance and release history
- UPDATE.md tracks open priorities, processed hardening work and future maintenance items.
- CHANGELOG.md records dated public changes, including compatibility, security, widget, test and documentation updates.
- Both files are maintained together whenever public behavior, dependencies, compatibility, assets, tests or security policy change.
License
Yii2 AdminLTE is released under the MIT License.