2017 © Pedro Peláez
 

yii2-extension easyiigii

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

image

thtmorais/easyiigii

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

  • Sunday, March 11, 2018
  • by thtmorais
  • Repository
  • 1 Watchers
  • 2 Stars
  • 30 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 5 Versions
  • 11 % Grown

The README.md

The project was abandoned, working on yii2-giix

EasYii Gii

EasyYii Gii (generator code Yii2) with Relation person to PostgreSQL, (*1)

Installation

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

Either run, (*3)

composer require thtmorais/easyiigii

or add, (*4)

"thtmorais/easyiigii": "^1"

to the require section of your composer.json file., (*5)

Configuration

  1. Then you must add this code at your config\web.php.
'components'=>[
    'user' => [
        'class' => 'webvimark\modules\UserManagement\components\UserConfig',

        // Comment this if you don't want to record user logins
        'on afterLogin' => function($event) {
                \webvimark\modules\UserManagement\models\UserVisitLog::newVisitor($event->identity->id);
            }
    ],
],

'modules' => [
      'user-management' => [
            'class' => 'webvimark\modules\UserManagement\UserManagementModule',
        'on beforeAction'=>function(yii\base\ActionEvent $event) {
                  if ( $event->action->uniqueId == 'user-management/auth/login' ){
                        $event->action->controller->layout = 'loginLayout.php';
                  };
            },
    ],
      'gridview' => [
          'class' => '\kartik\grid\Module',
      ],
      'datecontrol' => [
          'class' => '\kartik\datecontrol\Module',
      ],
  ],

See gridview settings on http://demos.krajee.com/grid#module, (*6)

See datecontrol settings on http://demos.krajee.com/datecontrol#module, (*7)

  1. In your config/console.php (this is needed for migrations and working with console)
'modules'=>[
    'user-management' => [
        'class' => 'webvimark\modules\UserManagement\UserManagementModule',
            'controllerNamespace'=>'vendor\webvimark\modules\UserManagement\controllers', // To prevent yii help from crashing
    ],
],
  1. Run migrations
./yii migrate --migrationPath=vendor/webvimark/module-user-management/migrations/

See user-management settings on https://github.com/webvimark/user-management, (*8)

Usage :

Go to your gii tools, and notice the new EasYii Gii Generator for models & CRUD, (*9)

Features

Model :

  1. Generate representation columns(RepresentingColumn)
  2. Generate CPF/CNPJ validator
  3. Generate e-mail validator
  4. Specify your label name / attribute for foreign keys and fields based on the DBMS comment

CRUD :

  1. Generate all CRUD with wildcard (*) of table
  2. Generate related input output
  3. Export to various formats
  4. Expandable / collapsible row at index grid view for related data
  5. Views with or without TabularForms
  6. Custom fields for dates (DateControl)
  7. Custom fields for foreign keys (Select2 and RepresentingColumn)
  8. Exclusion constraint based on DBMS actions
  9. Addition of the security module (User management module for Yii 2)
  10. Custom fields for input file (FileInput)
  11. View foreign key data based on RepresentingColumn

Migration Generator :

  1. Generate migration from your database structure (based on : https://github.com/deesoft/yii2-gii)

I'm open for any improvement, (*10)

Thanks To

  1. Jiwanndaru (jiwanndaru@gmail.com) for creating the tradition
  2. kartik-v (https://github.com/kartik-v) for most of widgets
  3. schmunk42 (https://github.com/schmunk42) for bootstrap & model base & extension
  4. mdmunir (https://github.com/mdmunir) for JsBlock & Migration Generator (from https://github.com/deesoft/yii2-gii)
  5. mootensai(https://github.com/mootensai) for yii2-enhanced-gii(https://github.com/mootensai/yii2-enhanced-gii)

Developers

  1. thtmorais(https://github.com/thtmorais)

The Versions

11/03 2018

dev-master

9999999-dev

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

  Sources   Download

BSD-3-Clause

The Requires

 

by Yohanes Candrajaya
by Jiwantoro Ndaru
by Matheus Evangelista Morais

yii2 gii yii relation enhanced simple-gii easyiigii easyii gii

11/03 2018

1.0.2

1.0.2.0

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

  Sources   Download

BSD-3-Clause

The Requires

 

by Yohanes Candrajaya
by Jiwantoro Ndaru
by Matheus Evangelista Morais

yii2 gii yii relation enhanced simple-gii easyiigii easyii gii

22/11 2017

1.0.1

1.0.1.0

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

  Sources   Download

BSD-3-Clause

The Requires

 

by Yohanes Candrajaya
by Jiwantoro Ndaru
by Matheus Evangelista Morais

yii2 gii yii relation enhanced simple-gii easyiigii easyii gii

17/11 2017

1.0

1.0.0.0

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

  Sources   Download

BSD-3-Clause

The Requires

 

by Yohanes Candrajaya
by Jiwantoro Ndaru
by Matheus Evangelista Morais

yii2 gii yii relation enhanced simple-gii easyiigii easyii gii

28/08 2017

v1.0

1.0.0.0

Generate Relational (hasMany, hasOne, belongsTo, & nested) Models & CRUD.

  Sources   Download

BSD-3-Clause

The Requires

 

by Yohanes Candrajaya
by Jiwantoro Ndaru
by Matheus Evangelista Morais

yii2 gii yii relation enhanced simple-gii easyiigii easyii gii