Generating a New Form Type Class Based on a Doctrine Entity
Generating a New Form Type Class Based on a Doctrine Entity¶
If your application is based on Symfony 2.x version, replace
php app/console before executing any of the console commands included
in this article.
generate:doctrine:form command generates a basic form type class
by using the metadata mapping of a given entity class:
$ php bin/console generate:doctrine:form AcmeBlogBundle:Post
The entity name given in shortcut notation containing the bundle name in which the entity is located and the name of the entity (
AcmeBlogBundle:Post, for example):
1 $ php bin/console generate:doctrine:form AcmeBlogBundle:Post
This work, including the code samples, is licensed under a Creative Commons BY-SA 3.0 license.