andres-breads / yii2-coreui
yii2 的 coreui 模板
dev-main
2022-11-11 19:43 UTC
Requires
- php: >=8.0
- coreui/coreui: ^4.2
- npm-asset/simplebar: ^5.0
Requires (Dev)
- phpunit/phpunit: ~9.5.0
This package is auto-updated.
Last update: 2024-09-19 01:35:42 UTC
README
CoreUI 管理仪表盘的 Yii2 扩展
安装
安装此扩展的首选方式是通过 composer。
php composer.phar require --prefer-dist andres-breads/yii2-coreui "*"
或者添加
"andres-breads/yii2-coreui": "*"
到你的 composer.json
文件的 require 部分。
使用方法
通过修改布局属性,让你的模块或控制器布局设置为 @andresbreads/coreui/layouts/main.php
。
你也可以让你的 @app/views/layouts/main.php
看起来像这样
<?php $this->beginContent('@andresbreads/coreui/layouts/main.php') ?> <?= $content ?> <?php $this->endContent() ?>
如果你想自定义菜单、页脚和用户缩略图,这些是在布局内部用来覆盖它们的参数
$this->params['mainMenu']; // Receives a list to be used in Menu::widget() $this->params['topLeftMenu']; // Receives a list to be used in Nav::widget() $this->params['topRightMenu']; // Receives a list to be used in Nav::widget() $this->params['userThumbnail']; // Receives a string to be used in <img src> $this->params['userMenu']; // Receives a list to be used in Dropdown::widget() $this->params['leftFooter']; // Receives a string $this->params['rightFooter']; // Receives a string