使用doctrine:generate:form覆盖已生成的表单?

时间:2015-07-24 10:52:33

标签: symfony doctrine symfony-forms

运行时:

php app/console doctrine:generate:form ProjectFrontendBundle:Car

如果表单类型类已经存在,我将在下面收到此消息。

  

无法生成CarType表单类,因为它已经存在于   〜/ workspace / certifi / src / Project / FrontendBundle / Form / CarType.php   文件

那么,是否可以覆盖已经生成的表单?

1 个答案:

答案 0 :(得分:1)

快速浏览一下app/console doctrine:generate:form -h表示遗憾:

Options:
  -h, --help               Display this help message
  -q, --quiet              Do not output any message
  -V, --version            Display this application version
      --ansi               Force ANSI output
      --no-ansi            Disable ANSI output
  -n, --no-interaction     Do not ask any interactive question
  -s, --shell              Launch the shell.
      --process-isolation  Launch commands from shell as a separate process.
  -e, --env=ENV            The Environment name. [default: "dev"]
      --no-debug           Switches off debug mode.
  -v|vv|vvv, --verbose     Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug

我猜你只是删除现有的类型类(如果你感到谨慎而不使用vcs,则删除它mv