jueves, 10 de octubre de 2013

Generar CRUD de las entidades

joebuntu@casa-desktop:~/NetBeansProjects/petramas$ php app/console doctrine:generate:crud<ENTER>

  Welcome to the Doctrine2 crud generator 

This command helps you generate CRUD controllers and templates.
First, you need to give the entity for which you want to generate a CRUD.
You can give an entity that does not exist yet and the wizard will help
you defining it.

You must use the shortcut notation like AcmeBlogBundle:Post

The Entity shortcut name: PetramasMainBundle:BoletaMaterial<ENTER>

By default, the generator creates two actions: list and show.
You can also ask it to generate "write" actions: new, update, and delete.

Do you want to generate the "write" actions [no]? yes<ENTER>

Determine the format to use for the generated CRUD.

Configuration format (yml, xml, php, or annotation) [annotation]:<ENTER> 
Determine the routes prefix (all the routes will be "mounted" under this
prefix: /prefix/, /prefix/new, ...).

Routes prefix [/boletamaterial]:<ENTER>
  Summary before generation 
You are going to generate a CRUD controller for "PetramasMainBundle:BoletaMaterial"
using the "annotation" format.

Do you confirm generation [yes]?<ENTER>
  CRUD generation 
Generating the CRUD code: OK
Generating the Form code: OK
  You can now start using the generated code!