wdmg / yii2-admin
Butterfly.CMS 的管理仪表板
1.4.6
2023-07-06 09:13 UTC
Requires
- bower-asset/font-awesome: ^6.4.0
- wdmg/yii2-base: ^1.3.2
- wdmg/yii2-chartjs: ^1.0.7
- wdmg/yii2-helpers: ^1.4.7
- wdmg/yii2-validators: ^1.0.7
- wdmg/yii2-widgets: ^1.0.4
- yiisoft/yii2: ^2.0.40
- dev-master
- 1.4.6
- 1.4.5
- 1.4.4
- 1.4.3
- 1.4.2
- 1.4.1
- 1.3.2
- 1.3.1
- 1.3.0
- 1.2.2
- 1.2.1
- 1.2.0
- 1.1.27
- 1.1.26
- 1.1.25
- 1.1.24
- 1.1.23
- 1.1.22
- 1.1.21
- 1.1.20
- 1.1.19
- 1.1.18
- 1.1.17
- 1.1.16
- 1.1.15
- 1.1.14
- 1.1.13
- 1.1.12
- 1.1.11
- 1.1.10
- 1.1.9
- 1.1.8
- 1.1.7
- 1.1.6
- 1.1.5
- 1.1.4
- 1.1.3
- 1.1.2
- 1.1.1
- 1.1.0
- 1.0.10
- 1.0.9
- 1.0.8
- 1.0.7
- 1.0.6
- 1.0.5
- 1.0.4
- 1.0.3
- 0.0.1
- dev-dependabot/npm_and_yarn/json5-2.2.3
- dev-dependabot/npm_and_yarn/qs-6.5.3
- dev-dependabot/npm_and_yarn/decode-uri-component-0.2.2
- dev-dependabot/npm_and_yarn/terser-5.14.2
- dev-dependabot/npm_and_yarn/copy-props-2.0.5
- dev-dependabot/npm_and_yarn/path-parse-1.0.7
- dev-dependabot/npm_and_yarn/postcss-7.0.36
- dev-dependabot/npm_and_yarn/browserslist-4.16.6
- dev-dependabot/npm_and_yarn/lodash-4.17.21
- dev-dependabot/npm_and_yarn/y18n-3.2.2
- dev-dependabot/npm_and_yarn/hosted-git-info-2.8.9
- dev-dependabot/npm_and_yarn/ini-1.3.8
This package is auto-updated.
Last update: 2024-09-07 20:58:06 UTC
README
Yii2 Admin 模块
Butterfly.CMS 的管理面板。
此模块是 Butterfly.СMS 内容管理系统的一个组成部分,但也可以作为一个独立的扩展使用。
版权所有 (c) 2019-2023 W.D.M.Group, Ukraine
要求
- PHP 5.6 或更高版本
- Yii2 v.2.0.40 及以上
- Yii2 Base 模块(必需)
- Yii2 Users 模块(必需)
安装
要安装该模块,请在控制台运行以下命令
$ composer require "wdmg/yii2-admin"
配置数据库连接后,请在控制台运行以下命令
$ php yii admin/init
然后选择要执行的操作
- 应用所有模块迁移
- 撤销所有模块迁移
迁移
在任何情况下,您都可以在控制台中运行以下命令以执行迁移和创建初始数据
$ php yii migrate --migrationPath=@vendor/wdmg/yii2-admin/migrations
配置
要将模块添加到项目中,请在配置文件中添加以下数据
'modules' => [
...
'admin' => [
'class' => 'wdmg\admin\Module',
'routePrefix' => 'admin',
'checkForUpdates' => true, // boolean, the flag if updates check turn on
'cacheExpire' => 3600, // integer, the time to expire cache
'multiSignIn' => false, // not allow by default
'sessionTimeout' => 900, // 15 min.
'customLocales' => [ // expanding the list of language locales for searching translations
'uk-UA' => 'Українська',
],
'customSupportModules' => [ // expanding the list of modules available for installation and download
'wdmg/yii2-example',
],
'customSidebarMenu' => [ // extending the sidebar menu list
[
'label' => 'Example',
'icon' => 'fa fa-fw fa-bars',
'url' => ['/admin/example/default'],
'order' => 10,
]
],
'customCreateMenu' => [ // expanding the creation menu list
'wdmg/yii2-example' => [
'label' => 'Add new example',
'url' => ['/admin/example/default/create']
]
],
'useSphinxSearch' => true, // boolean, the flag for configuration Sphinx Search
'sphinxSearchConf' => [ // configuration of Sphinx Search daemon
'dsn' => "mysql",
'host' => "127.0.0.1",
'port' => "9306",
'username' => "",
'password' => "",
]
],
...
],
路由
使用模块的 Module::dashboardNavItems()
方法生成 NavBar 的导航项列表,如下所示
<?php
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'label' => 'Modules',
'items' => [
Yii::$app->getModule('admin')->dashboardNavItems(),
...
]
]);
?>
状态和版本 [准备使用]
- v.1.4.6 - 修复侧边栏,终端链接
- v.1.4.5 - 侧边栏菜单中的计数器已修复
- v.1.4.4 - 添加任务和工单计数器