SonataEasyExtendsBundle is a prototype for generating a valid bundle structure from a Vendor Bundle. The tool is started with the simple command line: sonata:easy-extends:generate.

SonataEasyExtendsBundle 可以从供应商所提供的功能包中生成一个合法的功能包结构原型。这个工具从一个简单的命令行开始:sonata:easy-extends:generate

The command will generate:

该命令可以生成

  • all required directories for one bundle (controller, config, doctrine, views, ...)

  • 功能包所要求的全部目录(如生成controller、config、doctrine和views目录等等)

  • the mapping and entity files from those defined in the CPB. The SuperClass must be prefixed by BaseXXXXXX.

  • 在CPB中定义的映射文件和实体文件。超级类必须添加Base前缀,如BaseXXXXXX

  • the table name from the bundle name + entity name. (blog__post, where blog is the BlogBundle and Post the entity name)

  • 数据表名由功能包名+实体名组合而成(如blog__post,该表名是由BlogBundle功能包名的Blog+Post实体名组合而成

You can optionally define a --dest option to the command with the target directory for the extended bundle creation. By default, this is set to app (you should probably set it to src).

您可以定义选项 --dest 以指定扩展功能包的生成目录。该目录默认是app(当然您也可以将其设置为src)