我正在尝试使用我自己的一组模板来生成由 Tobias Munk 编写的带有 giiant 的 cruds 和模型,如下所示:https ://github.com/schmunk42/yii2-giiant/blob/master/docs/32-customizations.md
但我不能让它工作。
首先,我将 /yii2-giiant/src/generators 目录复制到我的应用程序中并进行了一些更改。
然后我改变了配置如下:
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
'allowedIPs' => ['127.0.0.1'],
'generators' => [
// generator name
'giiant-model' => [
//generator class
'class' => 'schmunk42\giiant\generators\model\Generator',
//setting for out templates
'templates' => [
// template name => path to template
'oemodel' =>
'@app/oetemplates/model/default',
]
]
],
];
但是当我从管理员运行巨型表单时,并没有拿起我的代码。
我还可以在表单中看到一个选择框,其中显示了带有模板的默认目录。但不知道如何在那里添加我的。
欢迎任何想法...