mj4444/yii2-gii 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

mj4444/yii2-gii

Composer 安装命令:

composer require mj4444/yii2-gii

包简介

The Gii extension for the Yii framework

README 文档

README

Extended models for Gii, the code generator of Yii2 Framework

Installation

The preferred way to install this extension is through composer.

php composer.phar require --dev --prefer-dist mj4444/yii2-gii:dev-master

The generators are registered automatically in the application bootstrap process, if the Gii module is enabled

Usage

Visit your application's Gii (eg. index.php?r=gii and choose one of the generators from the main menu screen.

For basic usage instructions see the Yii2 Guide section for Gii.

if (!YII_ENV_TEST) {
    Yii::$container->set('mj4444\yii2gii\generators\model\Generator', ['requiredStrict' => true]);
}

Differences from standard generator

  • Additional class of models for user code
  • Autogenerate validators for default values
  • Autogenerate validators for fields enum (possible partial/full deactivation)
  • Autogenerate constants for fields and enum set
  • Autogenerate behaviors for models containing fields handled TimestampBehavior
  • Table 'migration' is excluded from autogeneration (configurable)
  • Can configure ignore list tables
  • Completely redesigned creating names for relations

Отличия от стандартного генератора

  • Дополнительный класс модели для пользовательского кода
  • Автогенерация валидаторов для значений по умолчанию
  • Автогенерация валидаторов для полей enum (возможно частичное/полное отключение)
  • Автогенерация констант для полей enum и set
  • Автогенерация behaviors для моделей содержащих поля обрабатываемые TimestampBehavior
  • Таблица 'migration' исключается из автогенерации (настраивается)
  • Возможно настроить список игнорируемых таблиц
  • Полностью переработано создание имён для связей

Links

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-06-08