andydodot/yii2-dodotgii Gii Generator base on Kartik-V extension https://github.com/kartik-v

yii2-dodotgii

Gii CRUD Generator with custom and fix issues for inlislite (Opensource Digital Library)

Fix Issues :

  • I18N for placeholder in view _form.php and index.php button "Add" and "Reset List"
  • Title base on modul name without define variable on create.php & update.php
  • Edit link base on moduleId/ControllerID

Custom :

  • Ignorance some timespan field for inlislite development like CreateBy,CreateDate,CreateTerminal,UpdateBy,UpdateDate,UpdateTerminal

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require andydodot/yii2-dodotgii "dev-master"

or add

"andydodot/yii2-dodotgii": "dev-master"

to the require section of your composer.json file.

Usage

//if your gii modules configuration looks like below:
$config['modules']['gii'] = 'yii\gii\Module';

//change it to
$config['modules']['gii']['class'] = 'yii\gii\Module';
//Add this into backend/config/main-local.php
$config['modules']['gii']['generators'] = [
        'dodotgii-crud' => ['class' => 'andydodot\dodotgii\crud\Generator'],
    ];
//Add 'gridview' into your 'modules' section in backend/config/main.php
'modules' => [
        'gridview' => [
            'class' => 'kartik\grid\Module',
        ],

    ],
//add modules 'datecontrol' into your 'modules' section in common/config/main 
'modules' => [
        'datecontrol' =>  [
            'class' => 'kartik\datecontrol\Module',

            // format settings for displaying each date attribute
            'displaySettings' => [
                'date' => 'd-m-Y',
                'time' => 'H:i:s A',
                'datetime' => 'd-m-Y H:i:s A',
            ],

            // format settings for saving each date attribute
            'saveSettings' => [
                'date' => 'Y-m-d', 
                'time' => 'H:i:s',
                'datetime' => 'Y-m-d H:i:s',
            ],

            // automatically use kartik\widgets for each of the above formats
            'autoWidget' => true,

        ]
    ],

Original README :

Gii CRUD Generator base on kartik-v extension. Save repeatitive works on every new CRUD generated. Below are some of the features:

  • Data grid view are generated using kartik-v/yii2-grid, pjax are use for the grid
  • Detail View are generated using kartik-v/yii2-detail-view, controllers are generated to support edit mode saving and delete in Detail View.
  • _form are generated using kartik-v/yii2-builder, Date/Time/DateTime/TimeStamp column are automatically generated to use DateTimePicker Widget.
  • Using kartik-v/yii2-datecontrol to globalize date format, so date will automatically convert for the display and also for save according to the format you set, for all CRUD generated using this extension.

By using this extension, you no longer have to change your CRUD to using kartik-v extension, everything will be auto generated for you, and you could customize it later if you need.

Thanks for the great kartik-v extension.

For more information about kartik-v extension, please visit kartik-v at Github.

NOTE: This is the first extension i created, please kindly comment or suggest for better or correct me if im doing anything wrong. Thanks.

Installation

The preferred way to install this extension is through composer.

Either run

$ php composer.phar require warrence/yii2-kartikgii "dev-master"

or add

"warrence/yii2-kartikgii": "dev-master"

to the require section of your composer.json file.

Usage

//if your gii modules configuration looks like below:
$config['modules']['gii'] = 'yii\gii\Module';

//change it to
$config['modules']['gii']['class'] = 'yii\gii\Module';
//Add this into backend/config/main-local.php
$config['modules']['gii']['generators'] = [
        'kartikgii-crud' => ['class' => 'warrence\kartikgii\crud\Generator'],
    ];
//Add 'gridview' into your 'modules' section in backend/config/main.php
'modules' => [
        'gridview' => [
            'class' => 'kartik\grid\Module',
        ],

    ],
//add modules 'datecontrol' into your 'modules' section in common/config/main 
'modules' => [
        'datecontrol' =>  [
            'class' => 'kartik\datecontrol\Module',

            // format settings for displaying each date attribute
            'displaySettings' => [
                'date' => 'd-m-Y',
                'time' => 'H:i:s A',
                'datetime' => 'd-m-Y H:i:s A',
            ],

            // format settings for saving each date attribute
            'saveSettings' => [
                'date' => 'Y-m-d', 
                'time' => 'H:i:s',
                'datetime' => 'Y-m-d H:i:s',
            ],

            // automatically use kartik\widgets for each of the above formats
            'autoWidget' => true,

        ]
    ],

License

yii2-kartikgii is released under the BSD 3-Clause License. See the bundled LICENSE.md for details.

Statistics

Downloads
GitHub Stars
GitHub Forks

Releases

No stable releases.

Comments



No stable releases.



Unknown license
Stats
1 github stars & 1 github forks
0 downloads in the last day
0 downloads in the last 30 days
124 total downloads