【发布时间】:2018-10-20 17:50:45
【问题描述】:
我想自定义新的 makerbundle crud maker 的样板代码。没有像在 SensioGeneratorBundle 中那样简单地覆盖模板。我试图根据原始代码生成一个自定义的 MyMakeCrud - 但我对注入的 DoctrineEntityHelper $entityHelper 感到困惑。
Cannot autowire service "App\Maker\MakeMyCrud": argument "$entityHelper" of
method "__construct()" references class "Symfony\Bundle\MakerBundle\Doctri
ne\DoctrineEntityHelper" but no such service exists. You should maybe alias
this class to the existing "maker.doctrine_entity_helper" service.
现有的 maker.doctrine_entity_helper 在 maker 包中定义为私有。如何让注入运行?
你能帮帮我吗?有没有人定制 crud 生成的例子? sf4 中的新内容。
【问题讨论】:
标签: crud symfony4 boilerplate