Click here for EduSec Demo EduSec Screenshots

Change your gii default crud generator,Make a new as per your requirement

On 2013-06-10 - By Abhishek Shah

If you want to apply your new template for default gii crud generator,want to make your own gii crud,than follow the steps:
In your application,if you go to gii,you are seeing all generatoers on index.

You will get it from framework/gii/views/index.php
Here ,if you want to add any other type of generator,You can make it easily.

See framework/gii/generators,for referance.
Now we are starting to make our new generator,like crud generator:
For that make a folder,name suppose giiextended, in extensions folder.Make folder with your custom name,suppose mycrud,
1.Make Code file,like myCrudCode in mycrud,which extends CrudCode.Import

2.Make generator in giiextended folder,like MyCrudGenerator,which extends CrudGenerator,in which change $codeModel,which give path to code file,here myCode.
Import : Yii::import('gii.generators.
Also make it in mycrud,where $codemodel=ext.giiextended.myCrud.myCrudCode
please notice that,if folder name is mycrud,generate will be name of MycrudGenerator,first letter will be capital.
3.Make Folder template in mycrud folder,in which all views as u want.
4.Make a folder view,put a index.php in it,
copy it form crud(framework/gii/generators/crud/view/index.php) ,change name in h1 tag.
5.In config/main.php,in gii in generatorpath array,add ext.giiextended.
as example:

and here you are done,open gii in your app,you will get Mycrudgenerator with default yii Crud generator.
Similaraly,you are able to extend model and form generator also of gii.