定制 nullref/yii2-admin 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

nullref/yii2-admin

最新稳定版本:v0.0.3

Composer 安装命令:

composer require nullref/yii2-admin

包简介

README 文档

README

Latest Stable Version Total Downloads Latest Unstable Version License

Module for administration

Check extended version of this module at this link

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist nullref/yii2-admin "*"

or add

"nullref/yii2-admin": "*"

to the require section of your composer.json file.

Then You have run console command for install this module and run migrations:

php yii module/install nullref/yii2-admin
php yii modules-migrate

Pay attention that if you don't use our application template it needs to change config files structure to have ability run commands that show above.

Please check this documentation section

Admin Menu

For adding items to admin menu you have to implement IAdminModule interface, e.g.:

public static function getAdminMenu()
   {
       return [
           'label' => \Yii::t('admin', 'Subscription'),
           'icon' => 'envelope',
           'items' => [
               'emails' => ['label' => \Yii::t('app', 'Subscribers'), 'icon' => 'envelope-o', 'url' => ['/subscription/email/index']],
               'messages' => ['label' => \Yii::t('app', 'Messages'), 'icon' => 'envelope-o', 'url' => ['/subscription/message/index']],
           ]
       ];
   }

Admin Controller

If you use IAdminController interface in controller, admin layout and default access rule will be set in controller before action.

Modules system

This module integrated in system which contain other useful components. View details

Overriding

Example:

/** module config **/

'admin' => [
   'class' => 'nullref\admin\Module',
   'adminModel' => 'app\models\Admin', // admin model class
   'controllerMap' => [  //controllers
      'user' => 'app\modules\admin\controllers\UserController',
      'main' => 'app\modules\admin\controllers\MainController',
   ],
   'components' => [  //menu builder
      'menuBuilder' => 'app\\components\\MenuBuilder',
   ],
],

And translations

统计信息

  • 总下载量: 1.22k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 5
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-07-01