2017 © Pedro Peláez
 

yii2-extension yii2-giiant

Gii CRUD generator for Yii 2 Framework

image

schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

  • Tuesday, July 24, 2018
  • by schmunk
  • Repository
  • 40 Watchers
  • 227 Stars
  • 79,553 Installations
  • PHP
  • 18 Dependents
  • 0 Suggesters
  • 100 Forks
  • 40 Open issues
  • 43 Versions
  • 5 % Grown

The README.md

yii2-giiant

"Giiant is huge!", (*1)

Build Status, (*2)

What is this?

Giiant is an extended code-generator for models and CRUDs, based upon Gii (Yii 2.0 Framework)., (*3)

It creates prototypes for database models and backends including relations defined by foreign-key constrains in no-time., (*4)

To provide a highly flexible configuration system it features a callback-provider-queue to define rendering of customized inputs, columns or attribute values., (*5)

A main project goal is porting many features and learnings from gtc, giix, awecrud and other code-generators into one solution., (*6)

Resources

Features

Batch command

  • yii batch creates all models and/or CRUDs for a set of tables sequentially with a single command

Model generator

  • generates separate model classes to customize and base models classes which can be regenerated on schema changes
  • table prefixes can be stripped off model class names (not bound to db connection settings from Yii 2.0)

CRUD generator

  • input, attribute, column and relation customization with provider queues
  • callback provider to inject any kind of code for inputs, attributes and columns via dependency injection
  • virtual-relation support (non-foreign key relations)
  • model, view and controller locations can be customized to use subfolders
  • horizontal and vertical form layout
  • options for tidying generated code
  • action button class customization (Select "App Class" option on the Action Button Class option on CRUD generator to customize)

Installation

The preferred way to install this extension is through composer., (*7)

Using a stable version, (*8)

composer require schmunk42/yii2-giiant:"@stable"

Using latest master, (*9)

composer require schmunk42/yii2-giiant:"@dev"

The generators are registered automatically in the application bootstrap process, if Gii module is enabled., (*10)

You can try giiant via phd (dockerized PHP application template)., (*11)

Configuration

It's recommended to configure a customized batch command in your application CLI configuration., (*12)

'controllerMap' => [
    'batch' => [
        'class' => 'schmunk42\giiant\commands\BatchController',
        'overwrite' => true,
        'modelNamespace' => 'app\\modules\\crud\\models',
        'crudTidyOutput' => true,
    ]
],

Note: yii giiant-batch is an alias for the default configuration of BatchController registered by this extension., (*13)

You can add the giiant specific configuration config/giiant.php, and include this from your config/main.php., (*14)

See the batches section for configuration details., (*15)

Usage

To create a full-featured database backend, run the CLI batch command, (*16)

yii batch

You can still override the settings from the configuration, like selecting specific tables, (*17)

yii batch --tables=a,list,of,tables

Core commands

Show help for gii, (*18)

yii help gii

Create application-module for giiant CRUDs, (*19)

yii gii/giiant-module

The commands for generating models and CRUD, there are usually run via the batch command above., (*20)

yii gii/giiant-model
yii gii/giiant-crud

Advanced

Provider usage and configuration via dependency injection

See docs for details., (*21)

Using callbacks to provide code-snippets

See docs for details., (*22)

Troubleshooting

See docs for known-issues, platform specific usage, quirks, faq, ..., (*23)

Extras

Special thanks to motin, thyseus, uldisn and rcoelho for their work, inspirations and feedback., (*24)

Screenshots

giiant-0 2-screen-1 giiant-0 2-screen-2, (*25)


Built by dmstr, (*26)

The Versions

01/06 2015

0.4.0

0.4.0.0 https://github.com/schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 crud gii

26/05 2015

0.3.0

0.3.0.0 https://github.com/schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 crud gii

05/01 2015

0.2.0

0.2.0.0 https://github.com/schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 crud gii

16/12 2014

0.1.1

0.1.1.0 https://github.com/schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 crud gii

08/12 2014

0.1.0

0.1.0.0 https://github.com/schmunk42/yii2-giiant

Gii CRUD generator for Yii 2 Framework

  Sources   Download

BSD-3-Clause

The Requires

 

yii2 crud gii