murph-doc/docs/crud/generator.md

21 lines
792 B
Markdown
Raw Normal View History

2021-05-30 23:00:08 +02:00
# Generator
2021-05-31 16:30:46 +02:00
## Prepare your entity
* implements `App\Core\Entity\EntityInterface` (see [Entity Manager](/entities/em/))
* creates a repository query (see [Repository Query](/entities/query/))
* creates a factory (see [Factory](/entities/factory/))
* generates a form (see `php bin/console make:form --help`)
## Generation
The generation is performed in CLI. These information are required:
* The name of the futur controller (eg: `MyEntityAdminController`)
2021-06-04 10:48:41 +02:00
* The namespace of the entity (eg: `MyEntity`)
* The namespace of the entity repository query (eg: `MyEntityRepositoryQuery`)
* The namespace of the the entity factory (eg: `MyEntityFactory`)
* The namespace of the form used to create and update the entity (eg: `MyEntityType`)
2021-05-31 16:30:46 +02:00
Simply run `php bin/console make:crud-controller`.