mootensai / yii2-enhanced-gii

Enhanced Yii2 Gii (generator) that generates related Models & CRUD
MIT License
203 stars 99 forks source link

Custom Model Template #149

Open bwragg opened 5 years ago

bwragg commented 5 years ago

Hi,

Is it possible to specify a custom model template using enhanced-gii? Im trying something like this:

'enhanced-gii-model'=>[ 'class' => 'mootensai\enhancedgii\model\Generator', 'templates'=>[ 'isasmodel' => '@backend/custom-gii-templates/model/default', ] ],

but can't see it in the drop down list.

My paths are right because if I do something like this:

'model'=>[ 'class' => 'mootensai\enhancedgii\model\Generator', 'templates'=>[ 'isasmodel' => '@backend/custom-gii-templates/model/default', ] ],

I can see it in the normal Model generator.

Thanks

demonking commented 4 years ago

@mootensai You need to merge this pull request #153 to fix the Problem

My looks like this one:

` 'enhanced-gii-crud' => [ 'class' => 'mootensai\enhancedgii\crud\Generator', 'templates' => [ 'custom' => '@backend/views/yii2-enhanced-gii/crud/custom/' ] ], 'enhanced-gii-model' => [ 'class' => 'mootensai\enhancedgii\model\Generator', 'templates' => [ 'custom' => '@backend/views/yii2-enhanced-gii/model/custom/' ] ],

`