Upcoming Official Symfony Conferences

Generating a New Form Type Class Based on a Doctrine Entity

3.0 version
Unmaintained

Generating a New Form Type Class Based on a Doctrine Entity

Caution

If your application is based on Symfony 2.x version, replace php bin/console with php app/console before executing any of the console commands included in this article.

Usage

The generate:doctrine:form command generates a basic form type class by using the metadata mapping of a given entity class:

1
$ php bin/console generate:doctrine:form AcmeBlogBundle:Post

Required Arguments

entity

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.